algebra
本頁內容尚未翻譯。
IsAssoc
Section titled “IsAssoc”def IsAssoc (A : Type) (op : A -> A -> A) : TypeThe proposition that a binary operation is associative: x op (y op z) = (x op y) op z.
IsLeftUnit
Section titled “IsLeftUnit”def IsLeftUnit (A : Type) (op : A -> A -> A) (e : A) : TypeThe proposition that e is a left unit for op: e op x = x.
IsRightUnit
Section titled “IsRightUnit”def IsRightUnit (A : Type) (op : A -> A -> A) (e : A) : TypeThe proposition that e is a right unit for op: x op e = x.
IsMonoid
Section titled “IsMonoid”def IsMonoid (A : Type) (op : A -> A -> A) (e : A) : TypeThe proposition that (A, op, e) is a monoid: op is associative and e is a two-sided unit.
natAddIsAssoc
Section titled “natAddIsAssoc”def natAddIsAssoc : IsAssoc Nat addNatural-number addition is associative.
natAddIsLeftUnit
Section titled “natAddIsLeftUnit”def natAddIsLeftUnit : IsLeftUnit Nat add zeroZero is a left unit for natural-number addition.
natAddIsRightUnit
Section titled “natAddIsRightUnit”def natAddIsRightUnit : IsRightUnit Nat add zeroZero is a right unit for natural-number addition.
natAddIsMonoid
Section titled “natAddIsMonoid”def natAddIsMonoid : IsMonoid Nat add zeroNatural numbers form a monoid under addition with unit zero.
natMulIsLeftUnit
Section titled “natMulIsLeftUnit”def natMulIsLeftUnit : IsLeftUnit Nat mul (succ zero)One is a left unit for natural-number multiplication.
natMulIsRightUnit
Section titled “natMulIsRightUnit”def natMulIsRightUnit : IsRightUnit Nat mul (succ zero)One is a right unit for natural-number multiplication.
IsLeftInverse
Section titled “IsLeftInverse”def IsLeftInverse (A : Type) (op : A -> A -> A) (e : A) (inv : A -> A) : TypeThe proposition that inv is a left inverse for op with unit e: inv x op x = e.
IsRightInverse
Section titled “IsRightInverse”def IsRightInverse (A : Type) (op : A -> A -> A) (e : A) (inv : A -> A) : TypeThe proposition that inv is a right inverse for op with unit e: x op inv x = e.
IsGroup
Section titled “IsGroup”def IsGroup (A : Type) (op : A -> A -> A) (e : A) (inv : A -> A) : TypeThe proposition that (A, op, e, inv) is a group: a monoid in which inv gives two-sided inverses.
addIntLeftInv
Section titled “addIntLeftInv”def addIntLeftInv (n : Int) : Int.add (Int.neg n) n = pos zeroNegation is a left inverse for integer addition: (-n) + n = 0.
addIntLeftInvPos
Section titled “addIntLeftInvPos”def addIntLeftInvPos (k : Nat) : Int.add (Int.neg (pos k)) (pos k) = pos zeroLeft inverse law for integer addition on non-negative integers: (-k) + k = 0.
addIntLeftInvPosStep
Section titled “addIntLeftInvPosStep”def addIntLeftInvPosStep (j : Nat) : Int.add (negsucc j) (pos (succ j)) = pos zeroLeft inverse law for integer addition on positive integers: negsucc j + (j + 1) = 0.
addIntRightInv
Section titled “addIntRightInv”def addIntRightInv (n : Int) : Int.add n (Int.neg n) = pos zeroNegation is a right inverse for integer addition: n + (-n) = 0.
addIntRightInvPos
Section titled “addIntRightInvPos”def addIntRightInvPos (k : Nat) : Int.add (pos k) (Int.neg (pos k)) = pos zeroRight inverse law for integer addition on non-negative integers: k + (-k) = 0.
addIntRightInvPosStep
Section titled “addIntRightInvPosStep”def addIntRightInvPosStep (j : Nat) : Int.addNat (succ j) (negsucc j) = pos zeroAdding the natural number j + 1 to negsucc j gives zero.
addIntLeftInvNeg
Section titled “addIntLeftInvNeg”def addIntLeftInvNeg (k : Nat) : Int.add (Int.neg (negsucc k)) (negsucc k) = pos zeroLeft inverse law for integer addition on negative integers: -(negsucc k) + negsucc k = 0.
addIntRightInvNeg
Section titled “addIntRightInvNeg”def addIntRightInvNeg (k : Nat) : Int.add (negsucc k) (Int.neg (negsucc k)) = pos zeroRight inverse law for integer addition on negative integers: negsucc k + -(negsucc k) = 0.
addIntLeftId
Section titled “addIntLeftId”def addIntLeftId (n : Int) : Int.add (pos zero) n = nZero is a left identity for integer addition: 0 + n = n.
intAddIsLeftUnit
Section titled “intAddIsLeftUnit”def intAddIsLeftUnit : IsLeftUnit Int Int.add (pos zero)Zero is a left unit for integer addition.
intAddIsRightUnit
Section titled “intAddIsRightUnit”def intAddIsRightUnit : IsRightUnit Int Int.add (pos zero)Zero is a right unit for integer addition.
intAddIsLeftInverse
Section titled “intAddIsLeftInverse”def intAddIsLeftInverse : IsLeftInverse Int Int.add (pos zero) Int.negNegation gives left inverses for integer addition.
intAddIsRightInverse
Section titled “intAddIsRightInverse”def intAddIsRightInverse : IsRightInverse Int Int.add (pos zero) Int.negNegation gives right inverses for integer addition.
IsCommutative
Section titled “IsCommutative”def IsCommutative (A : Type) (op : A -> A -> A) : TypeThe proposition that a binary operation is commutative: x op y = y op x.
natAddIsComm
Section titled “natAddIsComm”def natAddIsComm : IsCommutative Nat addNatural-number addition is commutative.
natMulIsComm
Section titled “natMulIsComm”def natMulIsComm : IsCommutative Nat mulNatural-number multiplication is commutative.
natMulIsAssoc
Section titled “natMulIsAssoc”def natMulIsAssoc : IsAssoc Nat mulNatural-number multiplication is associative.
IsSemigroup
Section titled “IsSemigroup”def IsSemigroup (A : Type) (op : A -> A -> A) : TypeThe proposition that (A, op) is a semigroup, i.e. op is associative.
natAddIsSemigroup
Section titled “natAddIsSemigroup”def natAddIsSemigroup : IsSemigroup Nat addNatural numbers form a semigroup under addition.
natMulIsSemigroup
Section titled “natMulIsSemigroup”def natMulIsSemigroup : IsSemigroup Nat mulNatural numbers form a semigroup under multiplication.
natMulIsMonoid
Section titled “natMulIsMonoid”def natMulIsMonoid : IsMonoid Nat mul (succ zero)Natural numbers form a monoid under multiplication with unit one.
IsDistribL
Section titled “IsDistribL”def IsDistribL (A : Type) (mul : A -> A -> A) (add : A -> A -> A) : TypeThe proposition that mul distributes over add from the left: x * (y + z) = x * y + x * z.
IsDistribR
Section titled “IsDistribR”def IsDistribR (A : Type) (mul : A -> A -> A) (add : A -> A -> A) : TypeThe proposition that mul distributes over add from the right: (x + y) * z = x * z + y * z.
IsRing
Section titled “IsRing”def IsRing (A : Type) (add : A -> A -> A) (mul : A -> A -> A) (zero_r : A) (one : A) (neg : A -> A) : TypeThe proposition that (A, add, mul, 0, 1, neg) is a ring: an additive group, a multiplicative monoid, and two-sided distributivity.
IsAbelianGroup
Section titled “IsAbelianGroup”def IsAbelianGroup (A : Type) (op : A -> A -> A) (e : A) (inv : A -> A) : TypeThe proposition that (A, op, e, inv) is an abelian group: a group whose operation is commutative.
IsCommRing
Section titled “IsCommRing”def IsCommRing (A : Type) (add : A -> A -> A) (mul : A -> A -> A) (zero_r : A) (one : A) (neg : A -> A) : TypeThe proposition that (A, add, mul, 0, 1, neg) is a commutative ring: a ring with commutative multiplication.
natMulDistribR
Section titled “natMulDistribR”def natMulDistribR : IsDistribR Nat mul addNatural-number multiplication distributes over addition from the right: (x + y) * z = x * z + y * z.
natMulDistribL
Section titled “natMulDistribL”def natMulDistribL : IsDistribL Nat mul addNatural-number multiplication distributes over addition from the left: x * (y + z) = x * y + x * z.
PreservesOp
Section titled “PreservesOp”def PreservesOp (A : Type) (B : Type) (opA : A -> A -> A) (opB : B -> B -> B) (f : A -> B) : TypeThe proposition that f preserves the operation: f (x opA y) = f x opB f y.
PreservesUnit
Section titled “PreservesUnit”def PreservesUnit (A : Type) (B : Type) (eA : A) (eB : B) (f : A -> B) : TypeThe proposition that f sends the unit eA to the unit eB.
IsMonoidHom
Section titled “IsMonoidHom”def IsMonoidHom (A : Type) (B : Type) (opA : A -> A -> A) (opB : B -> B -> B) (eA : A) (eB : B) (f : A -> B) : TypeThe proposition that f is a monoid homomorphism: it preserves the operation and the unit.
idIsMonoidHom
Section titled “idIsMonoidHom”def idIsMonoidHom (A : Type) (op : A -> A -> A) (e : A) : IsMonoidHom A A op op e e (fun (x : A) => x)The identity function is a monoid homomorphism.
compIsMonoidHom
Section titled “compIsMonoidHom”def compIsMonoidHom (A : Type) (B : Type) (C : Type) (opA : A -> A -> A) (opB : B -> B -> B) (opC : C -> C -> C) (eA : A) (eB : B) (eC : C) (f : A -> B) (g : B -> C) (hf : IsMonoidHom A B opA opB eA eB f) (hg : IsMonoidHom B C opB opC eB eC g) : IsMonoidHom A C opA opC eA eC (fun (x : A) => g (f x))The composite of two monoid homomorphisms is a monoid homomorphism.
monoid_power
Section titled “monoid_power”def monoid_power (A : Type) (op : A -> A -> A) (e : A) (x : A) (n : Nat) : AThe n-th power of x in a monoid: x op (x op … e) with n copies of x.
nat_add_power
Section titled “nat_add_power”def nat_add_power (x : Nat) (n : Nat) : NatThe n-th additive power of a natural number, i.e. n copies of x added together.
monoidPowerZero
Section titled “monoidPowerZero”def monoidPowerZero (A : Type) (op : A -> A -> A) (e : A) (x : A) : monoid_power A op e x zero = eThe zeroth power in a monoid is the unit: x^0 = e.
evenTwo
Section titled “evenTwo”def evenTwo : isEven (succ (succ zero)) = trueTwo is even.
IsIdempotent
Section titled “IsIdempotent”def IsIdempotent (A : Type) (op : A -> A -> A) : TypeThe proposition that a binary operation is idempotent: x op x = x.
boolAndIsIdempotent
Section titled “boolAndIsIdempotent”def boolAndIsIdempotent : IsIdempotent Bool andBoolean conjunction is idempotent.
boolOrIsIdempotent
Section titled “boolOrIsIdempotent”def boolOrIsIdempotent : IsIdempotent Bool orBoolean disjunction is idempotent.
IsAbsorbing
Section titled “IsAbsorbing”def IsAbsorbing (A : Type) (mul_op : A -> A -> A) (zero_el : A) : TypeThe proposition that zero_el absorbs mul_op from the right: x * 0 = 0.
natMulIsAbsorbing
Section titled “natMulIsAbsorbing”def natMulIsAbsorbing : IsAbsorbing Nat mul zeroZero absorbs natural-number multiplication from the right: x * 0 = 0.
def NatLE (m : Nat) (n : Nat) : TypeLess-than-or-equal on natural numbers witnessed by a difference: m <= n when m + k = n for some k.
natLERefl
Section titled “natLERefl”def natLERefl (n : Nat) : NatLE n nEvery natural number is at most itself.
natLEZero
Section titled “natLEZero”def natLEZero (n : Nat) : NatLE zero nZero is at most every natural number.
natLESucc
Section titled “natLESucc”def natLESucc (m : Nat) (n : Nat) (p : NatLE m n) : NatLE m (succ n)If m <= n then m <= n + 1.
boolAndIsAssoc
Section titled “boolAndIsAssoc”def boolAndIsAssoc : IsAssoc Bool andBoolean conjunction is associative.
boolOrIsAssoc
Section titled “boolOrIsAssoc”def boolOrIsAssoc : IsAssoc Bool orBoolean disjunction is associative.
boolAndTrueLeftUnit
Section titled “boolAndTrueLeftUnit”def boolAndTrueLeftUnit : IsLeftUnit Bool and trueTrue is a left unit for Boolean conjunction.
boolAndTrueRightUnit
Section titled “boolAndTrueRightUnit”def boolAndTrueRightUnit : IsRightUnit Bool and trueTrue is a right unit for Boolean conjunction.
boolAndIsMonoid
Section titled “boolAndIsMonoid”def boolAndIsMonoid : IsMonoid Bool and trueBooleans form a monoid under conjunction with unit true.
boolOrFalseLeftUnit
Section titled “boolOrFalseLeftUnit”def boolOrFalseLeftUnit : IsLeftUnit Bool or falseFalse is a left unit for Boolean disjunction.
boolOrFalseRightUnit
Section titled “boolOrFalseRightUnit”def boolOrFalseRightUnit : IsRightUnit Bool or falseFalse is a right unit for Boolean disjunction.
boolOrIsMonoid
Section titled “boolOrIsMonoid”def boolOrIsMonoid : IsMonoid Bool or falseBooleans form a monoid under disjunction with unit false.
boolAndIsComm
Section titled “boolAndIsComm”def boolAndIsComm : IsCommutative Bool andBoolean conjunction is commutative.
boolOrIsComm
Section titled “boolOrIsComm”def boolOrIsComm : IsCommutative Bool orBoolean disjunction is commutative.
IsLeftDistrib
Section titled “IsLeftDistrib”def IsLeftDistrib (A : Type) (add_op : A -> A -> A) (mul_op : A -> A -> A) : TypeThe proposition that mul_op distributes over add_op from the left: a * (b + c) = a * b + a * c.
IsRightDistrib
Section titled “IsRightDistrib”def IsRightDistrib (A : Type) (add_op : A -> A -> A) (mul_op : A -> A -> A) : TypeThe proposition that mul_op distributes over add_op from the right: (a + b) * c = a * c + b * c.
natMulIsLeftDistrib
Section titled “natMulIsLeftDistrib”def natMulIsLeftDistrib : IsLeftDistrib Nat add mulNatural-number multiplication distributes over addition from the left.
natMulIsRightDistrib
Section titled “natMulIsRightDistrib”def natMulIsRightDistrib : IsRightDistrib Nat add mulNatural-number multiplication distributes over addition from the right.
leSuccSelf
Section titled “leSuccSelf”def leSuccSelf (n : Nat) : NatLE n (succ n)Every natural number is at most its successor: n <= n + 1.
def leAdd (m : Nat) (n : Nat) : NatLE m (add m n)A natural number is at most itself plus anything: m <= m + n.
IsZeroAnnihilatingL
Section titled “IsZeroAnnihilatingL”def IsZeroAnnihilatingL (A : Type) (mul_op : A -> A -> A) (zero_el : A) : TypeThe proposition that zero_el annihilates mul_op from the left: 0 * x = 0.
natMulIsZeroAnnihilatingL
Section titled “natMulIsZeroAnnihilatingL”def natMulIsZeroAnnihilatingL : IsZeroAnnihilatingL Nat mul zeroZero annihilates natural-number multiplication from the left: 0 * x = 0.
IsSemiring
Section titled “IsSemiring”def IsSemiring (A : Type) (add_op : A -> A -> A) (mul_op : A -> A -> A) (zero_el : A) (one_el : A) : TypeThe proposition that (A, add, mul, 0, 1) is a semiring: a commutative additive monoid, a multiplicative monoid, two-sided distributivity, and zero annihilating on both sides.
natIsSemiring
Section titled “natIsSemiring”def natIsSemiring : IsSemiring Nat add mul zero (succ zero)Natural numbers form a semiring under addition and multiplication.
IsCommSemiring
Section titled “IsCommSemiring”def IsCommSemiring (A : Type) (add_op : A -> A -> A) (mul_op : A -> A -> A) (zero_el : A) (one_el : A) : TypeThe proposition that (A, add, mul, 0, 1) is a commutative semiring: a semiring with commutative multiplication.
natIsCommSemiring
Section titled “natIsCommSemiring”def natIsCommSemiring : IsCommSemiring Nat add mul zero (succ zero)Natural numbers form a commutative semiring under addition and multiplication.
monoidPowerOne
Section titled “monoidPowerOne”def monoidPowerOne (A : Type) (op : A -> A -> A) (e : A) (x : A) : monoid_power A op e x (succ zero) = op x eThe first power in a monoid unfolds to x op e.
natAddPowerOne
Section titled “natAddPowerOne”def natAddPowerOne (x : Nat) : nat_add_power x (succ zero) = add x zeroThe first additive power of x unfolds to x + 0.
nat_mul_power
Section titled “nat_mul_power”def nat_mul_power (x : Nat) (n : Nat) : NatThe n-th multiplicative power of a natural number, x^n, computed as a monoid power with unit one.
natMulPowerZero
Section titled “natMulPowerZero”def natMulPowerZero (x : Nat) : nat_mul_power x zero = succ zeroThe zeroth multiplicative power is one: x^0 = 1.
natMulPowerOne
Section titled “natMulPowerOne”def natMulPowerOne (x : Nat) : nat_mul_power x (succ zero) = mul x (succ zero)The first multiplicative power unfolds to x * 1.
boolAndDistribOr
Section titled “boolAndDistribOr”def boolAndDistribOr : IsLeftDistrib Bool or andConjunction distributes over disjunction from the left: a && (b || c) = (a && b) || (a && c).
boolOrDistribAnd
Section titled “boolOrDistribAnd”def boolOrDistribAnd : IsLeftDistrib Bool and orDisjunction distributes over conjunction from the left: a || (b && c) = (a || b) && (a || c).
boolAndOrAbsorb
Section titled “boolAndOrAbsorb”def boolAndOrAbsorb : (a : Bool) -> (b : Bool) -> and a (or a b) = aAbsorption law for Booleans: a && (a || b) = a.
boolOrAndAbsorb
Section titled “boolOrAndAbsorb”def boolOrAndAbsorb : (a : Bool) -> (b : Bool) -> or a (and a b) = aAbsorption law for Booleans: a || (a && b) = a.
IsInvolutive
Section titled “IsInvolutive”def IsInvolutive (A : Type) (f : A -> A) : TypeThe proposition that f is an involution: f (f x) = x.
boolNotIsInvolutiveInst
Section titled “boolNotIsInvolutiveInst”def boolNotIsInvolutiveInst : IsInvolutive Bool notBoolean negation is an involution.
intNegIsInvolutive
Section titled “intNegIsInvolutive”def intNegIsInvolutive : IsInvolutive Int Int.negInteger negation is an involution: -(-n) = n.
IsInjective
Section titled “IsInjective”def IsInjective (A : Type) (B : Type) (f : A -> B) : TypeThe proposition that f is injective: f x = f y implies x = y.
succIsInjective
Section titled “succIsInjective”def succIsInjective : IsInjective Nat Nat succThe successor function on natural numbers is injective.
posIsInjective
Section titled “posIsInjective”def posIsInjective : IsInjective Nat Int posThe embedding of natural numbers into integers is injective.
leAntisym_zero
Section titled “leAntisym_zero”def leAntisym_zero : NatLE zero zeroZero is at most zero.
IsCommMonoid
Section titled “IsCommMonoid”def IsCommMonoid (A : Type) (op : A -> A -> A) (e : A) : TypeThe proposition that (A, op, e) is a commutative monoid.
natAddIsCommMonoid
Section titled “natAddIsCommMonoid”def natAddIsCommMonoid : IsCommMonoid Nat add zeroNatural numbers form a commutative monoid under addition.
natMulIsCommMonoid
Section titled “natMulIsCommMonoid”def natMulIsCommMonoid : IsCommMonoid Nat mul (succ zero)Natural numbers form a commutative monoid under multiplication.
boolAndIsCommMonoid
Section titled “boolAndIsCommMonoid”def boolAndIsCommMonoid : IsCommMonoid Bool and trueBooleans form a commutative monoid under conjunction with unit true.
boolOrIsCommMonoid
Section titled “boolOrIsCommMonoid”def boolOrIsCommMonoid : IsCommMonoid Bool or falseBooleans form a commutative monoid under disjunction with unit false.
IsLeftCancellative
Section titled “IsLeftCancellative”def IsLeftCancellative (A : Type) (op : A -> A -> A) : TypeThe proposition that op is left cancellative: a op b = a op c implies b = c.
natAddIsLeftCancellativeAux
Section titled “natAddIsLeftCancellativeAux”def natAddIsLeftCancellativeAux (a : Nat) (b : Nat) (c : Nat) (p : add a b = add a c) : b = cLeft cancellation for natural-number addition: a + b = a + c implies b = c, by recursion on a.
natAddIsLeftCancellative
Section titled “natAddIsLeftCancellative”def natAddIsLeftCancellative : IsLeftCancellative Nat addNatural-number addition is left cancellative.
IsRightCancellative
Section titled “IsRightCancellative”def IsRightCancellative (A : Type) (op : A -> A -> A) : TypeThe proposition that op is right cancellative: b op a = c op a implies b = c.
predSuccPath
Section titled “predSuccPath”def predSuccPath (n : Nat) : pred (succ n) = nThe predecessor of a successor: pred (n + 1) = n.
succPredPath
Section titled “succPredPath”def succPredPath (n : Nat) : succ (pred (succ n)) = succ nSuccessor after predecessor on a successor: succ (pred (n + 1)) = n + 1.
IsAnticommutative
Section titled “IsAnticommutative”def IsAnticommutative (A : Type) (op : A -> A -> A) (inv : A -> A) : TypeThe proposition that op is anticommutative with respect to inv: x op y = inv (y op x).
IsSelfInverse
Section titled “IsSelfInverse”def IsSelfInverse (A : Type) (op : A -> A -> A) (e : A) : TypeThe proposition that every element is its own inverse: x op x = e.
boolXorIsSelfInverse
Section titled “boolXorIsSelfInverse”def boolXorIsSelfInverse : IsSelfInverse Bool xor falseEvery Boolean is its own inverse under xor: xor x x = false.
IsUnital
Section titled “IsUnital”def IsUnital (A : Type) (op : A -> A -> A) (e : A) : TypeThe proposition that e is a two-sided unit for op.
natAddIsUnital
Section titled “natAddIsUnital”def natAddIsUnital : IsUnital Nat add zeroZero is a two-sided unit for natural-number addition.
natMulIsUnital
Section titled “natMulIsUnital”def natMulIsUnital : IsUnital Nat mul (succ zero)One is a two-sided unit for natural-number multiplication.
boolAndIsUnital
Section titled “boolAndIsUnital”def boolAndIsUnital : IsUnital Bool and trueTrue is a two-sided unit for Boolean conjunction.
boolOrIsUnital
Section titled “boolOrIsUnital”def boolOrIsUnital : IsUnital Bool or falseFalse is a two-sided unit for Boolean disjunction.
IsJoinSemilattice
Section titled “IsJoinSemilattice”def IsJoinSemilattice (A : Type) (join : A -> A -> A) : TypeThe proposition that join is associative, commutative and idempotent.
IsMeetSemilattice
Section titled “IsMeetSemilattice”def IsMeetSemilattice (A : Type) (meet : A -> A -> A) : TypeThe proposition that meet is associative, commutative and idempotent.
boolOrIsJoinSL
Section titled “boolOrIsJoinSL”def boolOrIsJoinSL : IsJoinSemilattice Bool orBooleans form a join semilattice under disjunction.
boolAndIsMeetSL
Section titled “boolAndIsMeetSL”def boolAndIsMeetSL : IsMeetSemilattice Bool andBooleans form a meet semilattice under conjunction.
IsLattice
Section titled “IsLattice”def IsLattice (A : Type) (join : A -> A -> A) (meet : A -> A -> A) : TypeThe proposition that join and meet form a lattice: both are semilattices and the absorption laws hold.
boolIsLattice
Section titled “boolIsLattice”def boolIsLattice : IsLattice Bool or andBooleans form a lattice with disjunction as join and conjunction as meet.
IsBoundedLattice
Section titled “IsBoundedLattice”def IsBoundedLattice (A : Type) (join : A -> A -> A) (meet : A -> A -> A) (top : A) (bot : A) : TypeThe proposition that (A, join, meet) is a lattice with top as the unit for meet and bot as the unit for join.
mulSuccSucc
Section titled “mulSuccSucc”theorem mulSuccSucc (m : Nat) (n : Nat) : mul m (succ (succ n)) = add m (add m (mul m n))Multiplying by n + 2 on the right: m * (n + 2) = m + (m + m * n).
mulSuccSuccL
Section titled “mulSuccSuccL”def mulSuccSuccL (m : Nat) (n : Nat) : mul (succ (succ m)) n = add n (add n (mul m n))Multiplying by m + 2 on the left: (m + 2) * n = n + (n + m * n).
IsSemiringLaws
Section titled “IsSemiringLaws”def IsSemiringLaws (A : Type) (add_op : A -> A -> A) (mul_op : A -> A -> A) (zero_el : A) (one_el : A) : TypeThe semiring laws for (A, add, mul, 0, 1) listed one by one in a single product.
natSemiringLaws
Section titled “natSemiringLaws”def natSemiringLaws : IsSemiringLaws Nat add mul zero (succ zero)Natural numbers satisfy every semiring law listed in IsSemiringLaws.
doubleDistrib
Section titled “doubleDistrib”def doubleDistrib (m : Nat) (n : Nat) : mul (succ (succ zero)) (add m n) = add (mul (succ (succ zero)) m) (mul (succ (succ zero)) n)Multiplication by two distributes over addition: 2 * (m + n) = 2 * m + 2 * n.
mulDistribSucc
Section titled “mulDistribSucc”def mulDistribSucc (m : Nat) (n : Nat) : mul m (succ n) = add m (mul m n)Multiplication by a successor on the right: m * (n + 1) = m + m * n.
tripleDistrib
Section titled “tripleDistrib”def tripleDistrib (m : Nat) (n : Nat) : mul (succ (succ (succ zero))) (add m n) = add (mul (succ (succ (succ zero))) m) (mul (succ (succ (succ zero))) n)Multiplication by three distributes over addition: 3 * (m + n) = 3 * m + 3 * n.
doubleSucc
Section titled “doubleSucc”def doubleSucc (n : Nat) : double (succ n) = succ (succ (double n))Doubling a successor adds two: double (n + 1) = double n + 2.
mulTwoEqDouble
Section titled “mulTwoEqDouble”def mulTwoEqDouble (n : Nat) : mul (succ (succ zero)) n = double nMultiplying by two is doubling: 2 * n = double n.
addLeftComm
Section titled “addLeftComm”theorem addLeftComm (a : Nat) (b : Nat) (c : Nat) : add a (add b c) = add b (add a c)Left commutativity of natural-number addition: a + (b + c) = b + (a + c).
addRightComm
Section titled “addRightComm”theorem addRightComm (a : Nat) (b : Nat) (c : Nat) : add (add a b) c = add (add a c) bRight commutativity of natural-number addition: (a + b) + c = (a + c) + b.
mulLeftComm
Section titled “mulLeftComm”theorem mulLeftComm (a : Nat) (b : Nat) (c : Nat) : mul a (mul b c) = mul b (mul a c)Left commutativity of natural-number multiplication: a * (b * c) = b * (a * c).
addCommV3
Section titled “addCommV3”theorem addCommV3 (m : Nat) (n : Nat) : add m n = add n mNatural-number addition is commutative: m + n = n + m (proved by tactics).
leSuccSucc
Section titled “leSuccSucc”def leSuccSucc (m : Nat) (n : Nat) (p : NatLE m n) : NatLE (succ m) (succ n)Less-than-or-equal is preserved by successor: m <= n implies m + 1 <= n + 1.
def GT (m : Nat) (n : Nat) : TypeStrict greater-than on natural numbers: m > n when n + 1 <= m.
boolXorIsAssoc
Section titled “boolXorIsAssoc”def boolXorIsAssoc : IsAssoc Bool xorBoolean xor is associative.
boolXorFalseLeftUnit
Section titled “boolXorFalseLeftUnit”def boolXorFalseLeftUnit : IsLeftUnit Bool xor falseFalse is a left unit for Boolean xor.
boolXorFalseRightUnit
Section titled “boolXorFalseRightUnit”def boolXorFalseRightUnit : IsRightUnit Bool xor falseFalse is a right unit for Boolean xor.
boolXorIsComm
Section titled “boolXorIsComm”def boolXorIsComm : IsCommutative Bool xorBoolean xor is commutative.
boolXorIsMonoid
Section titled “boolXorIsMonoid”def boolXorIsMonoid : IsMonoid Bool xor falseBooleans form a monoid under xor with unit false.
boolXorIsCommMonoid
Section titled “boolXorIsCommMonoid”def boolXorIsCommMonoid : IsCommMonoid Bool xor falseBooleans form a commutative monoid under xor with unit false.
IsHomomorphism
Section titled “IsHomomorphism”def IsHomomorphism (A : Type) (B : Type) (opA : A -> A -> A) (opB : B -> B -> B) (f : A -> B) : TypeThe proposition that f preserves a binary operation: f (x opA y) = f x opB f y.
IsEndomorphism
Section titled “IsEndomorphism”def IsEndomorphism (A : Type) (op : A -> A -> A) (f : A -> A) : TypeThe proposition that f : A -> A preserves the operation op.
idIsEndomorphism
Section titled “idIsEndomorphism”def idIsEndomorphism (A : Type) (op : A -> A -> A) : IsEndomorphism A op (fun (x : A) => x)The identity function preserves any binary operation.
notIsHomAndOr
Section titled “notIsHomAndOr”def notIsHomAndOr : IsHomomorphism Bool Bool and or notDe Morgan as a homomorphism: not (a && b) = not a || not b.
notIsHomOrAnd
Section titled “notIsHomOrAnd”def notIsHomOrAnd : IsHomomorphism Bool Bool or and notDe Morgan as a homomorphism: not (a || b) = not a && not b.
IsAction
Section titled “IsAction”def IsAction (M : Type) (A : Type) (mul_act : M -> M -> M) (e : M) (act : M -> A -> A) : TypeThe proposition that act is an action of the monoid (M, mul_act, e) on A: the unit acts trivially and acting by m * n is acting by n then m.
symAddZeroR
Section titled “symAddZeroR”def symAddZeroR (m : Nat) : m = add m zeroAdding zero on the right, read backwards: m = m + 0.
congSucc
Section titled “congSucc”def congSucc (m : Nat) (n : Nat) (p : m = n) : succ m = succ nThe successor function respects equality: m = n implies m + 1 = n + 1.
succAddCancel
Section titled “succAddCancel”def succAddCancel (m : Nat) (n : Nat) (k : Nat) (p : succ (add m k) = succ (add n k)) : add m k = add n kCancels a successor on both sides: (m + k) + 1 = (n + k) + 1 implies m + k = n + k.
natAddRightCancel
Section titled “natAddRightCancel”def natAddRightCancel (a : Nat) (b : Nat) (c : Nat) (p : add b a = add c a) : b = cRight cancellation for natural-number addition: b + a = c + a implies b = c.
iterateSuccZero
Section titled “iterateSuccZero”theorem iterateSuccZero (n : Nat) : iterate n succ zero = nApplying the successor n times to zero gives n.
squareIsPower2
Section titled “squareIsPower2”def squareIsPower2 (n : Nat) : square n = Nat.pow n (succ (succ zero))The square of n is its second power: square n = n^2.
IsMonotone
Section titled “IsMonotone”def IsMonotone (f : Nat -> Nat) : TypeThe proposition that a function on natural numbers is monotone with respect to NatLE.
orDistribAndTac
Section titled “orDistribAndTac”theorem orDistribAndTac (a : Bool) (b : Bool) (c : Bool) : or a (and b c) = and (or a b) (or a c)Disjunction distributes over conjunction: a || (b && c) = (a || b) && (a || c) (proved by tactics).
andDistribOrTac
Section titled “andDistribOrTac”theorem andDistribOrTac (a : Bool) (b : Bool) (c : Bool) : and a (or b c) = or (and a b) (and a c)Conjunction distributes over disjunction: a && (b || c) = (a && b) || (a && c) (proved by tactics).
notNotTac
Section titled “notNotTac”theorem notNotTac (b : Bool) : not (not b) = bBoolean negation is involutive: not (not b) = b (proved by tactics).
IsSurjective
Section titled “IsSurjective”def IsSurjective (A : Type) (B : Type) (f : A -> B) : TypeThe type saying f is surjective: every y in the codomain has a chosen preimage x with f x = y.
IsBijective
Section titled “IsBijective”def IsBijective (A : Type) (B : Type) (f : A -> B) : TypeThe type saying f is bijective: both injective and surjective.
IsLeftZero
Section titled “IsLeftZero”def IsLeftZero (A : Type) (op : A -> A -> A) (e : A) : TypeThe proposition that e is a left zero for op: e op x = e.
natMulLeftZero
Section titled “natMulLeftZero”def natMulLeftZero : IsLeftZero Nat mul zeroZero is a left zero for natural-number multiplication: 0 * x = 0.
boolAndLeftZero
Section titled “boolAndLeftZero”def boolAndLeftZero : IsLeftZero Bool and falseFalse is a left zero for conjunction: false && x = false.
boolOrLeftZero
Section titled “boolOrLeftZero”def boolOrLeftZero : IsLeftZero Bool or trueTrue is a left zero for disjunction: true || x = true.
IsRightZero
Section titled “IsRightZero”def IsRightZero (A : Type) (op : A -> A -> A) (e : A) : TypeThe proposition that e is a right zero for op: x op e = e.
natMulRightZero
Section titled “natMulRightZero”def natMulRightZero : IsRightZero Nat mul zeroZero is a right zero for natural-number multiplication: x * 0 = 0.
boolAndRightZero
Section titled “boolAndRightZero”def boolAndRightZero : IsRightZero Bool and falseFalse is a right zero for conjunction: x && false = false.
boolOrRightZero
Section titled “boolOrRightZero”def boolOrRightZero : IsRightZero Bool or trueTrue is a right zero for disjunction: x || true = true.
lengthMapV2
Section titled “lengthMapV2”theorem lengthMapV2 {A : Type} {B : Type} (f : A -> B) (xs : List A) : length (map f xs) = length xsMapping a function over a list preserves its length (proved by tactics).
natAddSummary
Section titled “natAddSummary”def natAddSummary : IsCommMonoid Nat add zeroNatural numbers form a commutative monoid under addition.
natMulSummary
Section titled “natMulSummary”def natMulSummary : IsCommMonoid Nat mul (succ zero)Natural numbers form a commutative monoid under multiplication.
natSemiringSummary
Section titled “natSemiringSummary”def natSemiringSummary : IsCommSemiring Nat add mul zero (succ zero)Natural numbers form a commutative semiring.
boolAndSummary
Section titled “boolAndSummary”def boolAndSummary : IsCommMonoid Bool and trueBooleans form a commutative monoid under conjunction.
boolOrSummary
Section titled “boolOrSummary”def boolOrSummary : IsCommMonoid Bool or falseBooleans form a commutative monoid under disjunction.
boolXorSummary
Section titled “boolXorSummary”def boolXorSummary : IsCommMonoid Bool xor falseBooleans form a commutative monoid under xor.
boolLatticeSummary
Section titled “boolLatticeSummary”def boolLatticeSummary : IsLattice Bool or andBooleans form a lattice under disjunction and conjunction.
andIdempTac
Section titled “andIdempTac”theorem andIdempTac (x : Bool) : and x x = xBoolean conjunction is idempotent: x && x = x (proved by tactics).
orIdempTac
Section titled “orIdempTac”theorem orIdempTac (x : Bool) : or x x = xBoolean disjunction is idempotent: x || x = x (proved by tactics).
IsDistribBoth
Section titled “IsDistribBoth”def IsDistribBoth (A : Type) (mul : A -> A -> A) (add : A -> A -> A) : TypeThe proposition that mul distributes over add from both sides.
natDistribBoth
Section titled “natDistribBoth”def natDistribBoth : IsDistribBoth Nat mul addNatural-number multiplication distributes over addition from both sides.
IsFieldLaws
Section titled “IsFieldLaws”def IsFieldLaws (A : Type) (add : A -> A -> A) (mul : A -> A -> A) (zero_r : A) (one : A) (neg : A -> A) : TypeThe field laws checked here: a commutative ring with commutative multiplication; multiplicative inverses are not included.
RatRaw
Section titled “RatRaw”def RatRaw : TypeRaw rationals as unnormalized (numerator, denominator) pairs of integers.
rat_zero_raw
Section titled “rat_zero_raw”def rat_zero_raw : RatRawThe raw rational zero, 0 / 1.
rat_one_raw
Section titled “rat_one_raw”def rat_one_raw : RatRawThe raw rational one, 1 / 1.
IsAbsorbLeft
Section titled “IsAbsorbLeft”def IsAbsorbLeft (A : Type) (meet : A -> A -> A) (join : A -> A -> A) : TypeThe absorption law of meet over join: meet a (join a b) = a.
IsAbsorbRight
Section titled “IsAbsorbRight”def IsAbsorbRight (A : Type) (join : A -> A -> A) (meet : A -> A -> A) : TypeThe absorption law of join over meet: join a (meet a b) = a.
IsModularLaw
Section titled “IsModularLaw”def IsModularLaw (A : Type) (join : A -> A -> A) (meet : A -> A -> A) : TypeThe modular law: whenever a <= c (that is, meet a c = a), join a (meet b c) = meet (join a b) c.
IsDistributiveLattice
Section titled “IsDistributiveLattice”def IsDistributiveLattice (A : Type) (join : A -> A -> A) (meet : A -> A -> A) : TypeThe proposition that meet and join distribute over each other in both directions.
IsClosedUnderAdd
Section titled “IsClosedUnderAdd”def IsClosedUnderAdd (A : Type) (add : A -> A -> A) (S : A -> Type) : TypeThe proposition that the subset S is closed under add.
IsClosedUnderMul
Section titled “IsClosedUnderMul”def IsClosedUnderMul (A : Type) (mul : A -> A -> A) (S : A -> Type) : TypeThe proposition that the subset S absorbs multiplication on the left: S y implies S (x * y) for every x.
IsIdeal
Section titled “IsIdeal”def IsIdeal (A : Type) (add : A -> A -> A) (mul : A -> A -> A) (S : A -> Type) : TypeThe proposition that S is a left ideal: closed under addition and under multiplication by any ring element.
IsGroupAction
Section titled “IsGroupAction”def IsGroupAction (G : Type) (X : Type) (act : G -> X -> X) (e : G) (op : G -> G -> G) : TypeThe proposition that act is an action of (G, op, e) on X: the unit acts trivially and acting by g op h is acting by h then g.
trivialActIsGroupAction
Section titled “trivialActIsGroupAction”def trivialActIsGroupAction (G : Type) (X : Type) (e : G) (op : G -> G -> G) : IsGroupAction G X (fun (g : G) => fun (x : X) => x) e opThe trivial action, where every element fixes every point, is a group action.
KernelPred
Section titled “KernelPred”def KernelPred (A : Type) (B : Type) (eB : B) (f : A -> B) : A -> TypeThe kernel of f as a predicate: x is in it when f x = eB.
ImagePred
Section titled “ImagePred”def ImagePred (A : Type) (B : Type) (f : A -> B) : B -> TypeThe image of f as a predicate: y is in it when some x has f x = y.
IsGroupHom
Section titled “IsGroupHom”def IsGroupHom (A : Type) (B : Type) (opA : A -> A -> A) (opB : B -> B -> B) (f : A -> B) : TypeThe proposition that f preserves the group operation: f (x opA y) = f x opB f y.
idIsGroupHom
Section titled “idIsGroupHom”def idIsGroupHom (A : Type) (op : A -> A -> A) : IsGroupHom A A op op (fun (x : A) => x)The identity function is a group homomorphism.
compIsGroupHom
Section titled “compIsGroupHom”def compIsGroupHom (A : Type) (B : Type) (C : Type) (opA : A -> A -> A) (opB : B -> B -> B) (opC : C -> C -> C) (f : A -> B) (g : B -> C) (hf : IsGroupHom A B opA opB f) (hg : IsGroupHom B C opB opC g) : IsGroupHom A C opA opC (fun (x : A) => g (f x))The composite of two group homomorphisms is a group homomorphism.
boolAndIsMonoid_via
Section titled “boolAndIsMonoid_via”def boolAndIsMonoid_via : IsMonoid Bool and trueBooleans form a monoid under conjunction with unit true.
boolOrIsMonoid_via
Section titled “boolOrIsMonoid_via”def boolOrIsMonoid_via : IsMonoid Bool or falseBooleans form a monoid under disjunction with unit false.
natAddMonCommPair
Section titled “natAddMonCommPair”def natAddMonCommPair : (IsMonoid Nat add zero) × (IsCommutative Nat add)Natural-number addition is a monoid and commutative, given as a pair.
pairNat
Section titled “pairNat”def pairNat (m : Nat) (n : Nat) : Nat × NatBuilds a pair of natural numbers.
pairNatFst
Section titled “pairNatFst”def pairNatFst (m : Nat) (n : Nat) : fst (pairNat m n) = mThe first projection of pairNat m n is m.
pairNatSnd
Section titled “pairNatSnd”def pairNatSnd (m : Nat) (n : Nat) : snd (pairNat m n) = nThe second projection of pairNat m n is n.
idIsId
Section titled “idIsId”def idIsId (A : Type) (x : A) : (fun (y : A) => y) x = xApplying the identity function returns its argument.
alg_const
Section titled “alg_const”def alg_const (A : Type) (B : Type) (b : B) : A -> BThe constant function A -> B with value b.
constApplied
Section titled “constApplied”def constApplied (A : Type) (B : Type) (b : B) (x : A) : alg_const A B b x = bThe constant function with value b returns b at every point.
pairBool
Section titled “pairBool”def pairBool (a : Bool) (b : Bool) : Bool × BoolBuilds a pair of Booleans.