Unbundled algebra classes #
These classes and the @[algebra]
attribute are part of an incomplete refactor described
here on the github Wiki.
By themselves, these classes are not good replacements for the monoid
/ group
etc structures
provided by mathlib, as they are not discoverable by simp
unlike the current lemmas due to there
being little to index on. The Wiki page linked above describes an algebraic normalizer, but it is not
implemented.
- symm_op : ∀ (a b : α), op a b = op b a
- comm : ∀ (a b : α), op a b = op b a
Instances
- option.lift_or_get_comm
- xor.is_commutative
- comm_semigroup.to_is_commutative
- add_comm_semigroup.to_is_commutative
- sup_is_commutative
- inf_is_commutative
- set.union_is_comm
- set.inter_is_comm
- finset.has_union.union.is_commutative
- gcd_monoid.gcd.is_commutative
- gcd_monoid.lcm.is_commutative
- symm_diff_is_comm
- assoc : ∀ (a b c : α), op (op a b) c = op a (op b c)
Instances
- option.lift_or_get_assoc
- semigroup.to_is_associative
- add_semigroup.to_is_associative
- equiv.arrow_congr.is_associative
- sup_is_associative
- inf_is_associative
- set.union_is_assoc
- set.inter_is_assoc
- list.has_append.append.is_associative
- finset.has_union.union.is_associative
- gcd_monoid.gcd.is_associative
- gcd_monoid.lcm.is_associative
- symm_diff_is_assoc
- left_id : ∀ (a : α), op o a = a
- right_id : ∀ (a : α), op a o = a
- left_null : ∀ (a : α), op o a = o
- right_null : ∀ (a : α), op a o = o
Instances
Instances
- idempotent : ∀ (a : α), op a a = a
- left_distrib : ∀ (a b c : α), op₁ a (op₂ b c) = op₂ (op₁ a b) (op₁ a c)
- right_distrib : ∀ (a b c : α), op₁ (op₂ a b) c = op₂ (op₁ a c) (op₁ b c)
- left_inv : ∀ (a : α), op (inv a) a = o
- right_inv : ∀ (a : α), op a (inv a) = o
- refl : ∀ (a : α), r a a
is_refl X r
means the binary relation r
on X
is reflexive.
Instances
- is_preorder.to_is_refl
- is_total.to_is_refl
- iff.is_refl
- prod.is_refl_left
- prod.is_refl_right
- prod.is_refl_preimage_fst
- prod.is_refl_preimage_snd
- has_le.le.is_refl
- ge.is_refl
- set.has_subset.subset.is_refl
- subrel.is_refl
- list.sublist_forall₂.is_refl
- finset.has_subset.subset.is_refl
- wcovby.is_refl
- sum.lift_rel.is_refl
- sum.lex.is_refl
- symm : ∀ (a b : α), r a b → r b a
is_symm X r
means the binary relation r
on X
is symmetric.
The opposite of a symmetric relation is symmetric.
- antisymm : ∀ (a b : α), r a b → r b a → a = b
is_antisymm X r
means the binary relation r
on X
is antisymmetric.
- trans : ∀ (a b c : α), r a b → r b c → r a c
is_trans X r
means the binary relation r
on X
is transitive.
Instances
- is_preorder.to_is_trans
- is_total_preorder.to_is_trans
- is_per.to_is_trans
- is_strict_order.to_is_trans
- is_well_order.is_trans
- iff.is_trans
- prod.lex.is_trans
- prod.is_trans_preimage_fst
- prod.is_trans_preimage_snd
- has_le.le.is_trans
- ge.is_trans
- has_lt.lt.is_trans
- gt.is_trans
- set.has_subset.subset.is_trans
- set.has_ssubset.ssubset.is_trans
- subrel.is_trans
- list.sublist_forall₂.is_trans
- finset.has_subset.subset.is_trans
- finset.has_ssubset.ssubset.is_trans
- encodable.order.preimage.is_trans
- sum.lift_rel.is_trans
- sum.lex.is_trans
is_preorder X r
means that the binary relation r
on X
is a pre-order, that is, reflexive
and transitive.
is_total_preorder X r
means that the binary relation r
on X
is total and a preorder.
Every total pre-order is a pre-order.
- to_is_preorder : is_preorder α r
- to_is_antisymm : is_antisymm α r
- to_is_strict_order : is_strict_order α lt
- to_is_incomp_trans : is_incomp_trans α lt
- to_is_trichotomous : is_trichotomous α lt
- to_is_strict_weak_order : is_strict_weak_order α lt
Equations
- strict_weak_order.equiv a b = (¬r a b ∧ ¬r b a)