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
- assoc : ∀ (a b c : α), op (op a b) c = op a (op b c)
Instances
- option.lift_or_get_assoc
- equiv.arrow_congr.is_associative
- sup_is_associative
- inf_is_associative
- set.union_is_assoc
- set.inter_is_assoc
- semigroup.to_is_associative
- add_semigroup.to_is_associative
- list.has_append.append.is_associative
- finset.has_union.union.is_associative
- gcd_monoid.gcd.is_associative
- gcd_monoid.lcm.is_associative
- 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
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
- has_le.le.is_trans
- ge.is_trans
- has_lt.lt.is_trans
- gt.is_trans
- prod.is_trans_preimage_fst
- prod.is_trans_preimage_snd
- list.sublist_forall₂.is_trans
- encodable.order.preimage.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)