/-
Copyright (c) 2020 Mario Carneiro, Johan Commelin. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro, Johan Commelin
-/
module
public import Mathlib.Algebra.GroupWithZero.WithZero
public import Mathlib.Algebra.Ring.Defs
/-!
# Adjoining a zero to a semiring
-/
public section
namespace WithZero
variable {α : Type*}
instance instLeftDistribClass [Mul α] [Add α] [LeftDistribClass α] :
LeftDistribClass (WithZero α) where
left_distrib a b c := by
cases a; · rfl
cases b <;> cases c <;> try rfl
congrm some $(left_distrib ..)
instance instRightDistribClass [Mul α] [Add α] [RightDistribClass α] :
RightDistribClass (WithZero α) where
right_distrib a b c := by
cases c; · simp
cases a <;> cases b <;> try rfl
congrm some $(right_distrib ..)
instance instDistrib [Distrib α] : Distrib (WithZero α) where
left_distrib := left_distrib
right_distrib := right_distrib
instance instSemiring [Semiring α] : Semiring (WithZero α) where
end WithZero
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet am 2026-11-24)
¤
*© Formatika GbR, Deutschland