The areas / V34. The tactics of Mathlib
Mathlib.Tactic.SetNotationForOrder
28 declarations. Mathlib docs · Source
Set notation for order operations
This file allows the use of ⊆ notation while the underlying constant is ≤.
Similarly for ⊂/<, ⊇/≥ and ⊃/>.
A new copy of the a ⊆ b syntax is declared, which overwrites the original one.
To elaborate this notation, a and b are elaborated, and if the type of a and b is
tagged with @[use_set_notation_for_order], LE.le is used instead of Subset.
A new delaborator for LE.le is also added so that a ≤ b prints as a ⊆ b whenever the type is
tagged with @[use_set_notation_for_order].
This tag is used for Set, Finset, PSet and ZFSet. It is not used for Multiset and List,
since they have both ≤ and ⊆ defined on them, with different meanings.
TODO: Unify more order operations such as iUnion/iSup and sUnion and sSup
Delaboration
Elaboration
Dot-notation namespace linter
Lemma translation
def UsesSetNotationForOrder.ctorIdx E1 #
{α : Type u_1} → UsesSetNotationForOrder α → ℕ
class UsesSetNotationForOrder E1 #
Type u_1 → Type
UsesSetNotationForOrder is used to track whether a type is tagged with
@[use_set_notation_for_order].
ctor UsesSetNotationForOrder.mk E0 #
{α : Type u_1} → UsesSetNotationForOrder α
def Mathlib.Meta.SetNotationForOrder.delabLe E1 #
Lean.PrettyPrinter.Delaborator.Delab
Delaborate x ≤ y into x ⊆ y if the type is tagged with @[use_set_notation_for_order].
def Mathlib.Meta.SetNotationForOrder.delabLt E1 #
Lean.PrettyPrinter.Delaborator.Delab
Delaborate x < y into x ⊂ y if the type is tagged with @[use_set_notation_for_order].
def Mathlib.Meta.SetNotationForOrder.delabGe E1 #
Lean.PrettyPrinter.Delaborator.Delab
Delaborate x ≥ y into x ⊇ y if the type is tagged with @[use_set_notation_for_order].
def Mathlib.Meta.SetNotationForOrder.delabGt E1 #
Lean.PrettyPrinter.Delaborator.Delab
Delaborate x > y into x ⊃ y if the type is tagged with @[use_set_notation_for_order].
def Mathlib.Meta.SetNotationForOrder.delabMax E1 #
Lean.PrettyPrinter.Delaborator.Delab
Delaborate max x y into x ∪ y if the type is tagged with @[use_set_notation_for_order].
def Mathlib.Meta.SetNotationForOrder.delabMin E1 #
Lean.PrettyPrinter.Delaborator.Delab
Delaborate min x y into x ∩ y if the type is tagged with @[use_set_notation_for_order].
opaque Mathlib.Meta.SetNotationForOrder.SubsetElabAux E0 #
{α : Type u} → α → α → Prop
This relation is an implementation detail of the ⊆ elaborator.
opaque Mathlib.Meta.SetNotationForOrder.UnionInterElabAux E0 #
{α : Type u} → α → α → α
This operation is an implementation detail of the ∪/∩ elaborator.
def Mathlib.Meta.SetNotationForOrder.subsetStx' E1 #
Lean.TrailingParserDescr
Subset relation: a ⊆ b.
For types tagged with @[use_set_notation_for_order],
the relation LE.le is used instead of Subset.
The hover info shows which one is used.
Conventions for notations in identifiers:
- The recommended spelling of
⊆in identifiers issubset.
def Mathlib.Meta.SetNotationForOrder.ssubsetStx' E1 #
Lean.TrailingParserDescr
Strict subset relation: a ⊂ b.
For types tagged with @[use_set_notation_for_order],
the relation LT.lt is used instead of SSubset.
The hover info shows which one is used.
Conventions for notations in identifiers:
- The recommended spelling of
⊂in identifiers isssubset.
def Mathlib.Meta.SetNotationForOrder.supsetStx' E1 #
Lean.TrailingParserDescr
Superset relation: a ⊇ b.
For types tagged with @[use_set_notation_for_order],
the relation GE.ge is used instead of Superset.
The hover info shows which one is used.
Conventions for notations in identifiers:
- The recommended spelling of
⊇in identifiers issuperset.
def Mathlib.Meta.SetNotationForOrder.ssupsetStx' E1 #
Lean.TrailingParserDescr
Strict superset relation: a ⊃ b.
For types tagged with @[use_set_notation_for_order],
the relation GT.gt is used instead of SSuperset.
The hover info shows which one is used.
Conventions for notations in identifiers:
- The recommended spelling of
⊃in identifiers isssuperset.
def Mathlib.Meta.SetNotationForOrder.unionStx' E1 #
Lean.TrailingParserDescr
a ∪ b is the union of a and b.
For types tagged with @[use_set_notation_for_order],
the function Max.max is used instead of Union.union.
The hover info shows which one is used.
Conventions for notations in identifiers:
- The recommended spelling of
∪in identifiers isunion.
def Mathlib.Meta.SetNotationForOrder.interStx' E1 #
Lean.TrailingParserDescr
a ∩ b is the intersection of a and b.
For types tagged with @[use_set_notation_for_order],
the function Min.min is used instead of Inter.inter.
The hover info shows which one is used.
Conventions for notations in identifiers:
- The recommended spelling of
∩in identifiers isinter.
def Mathlib.Meta.SetNotationForOrder.elabSubsetStx' E1 #
Lean.Elab.Term.TermElab
Elaborator for x ⊆ y notation.
def Mathlib.Meta.SetNotationForOrder.elabSSubsetStx' E1 #
Lean.Elab.Term.TermElab
Elaborator for x ⊂ y notation.
def Mathlib.Meta.SetNotationForOrder.elabSupsetStx' E1 #
Lean.Elab.Term.TermElab
Elaborator for x ⊇ y notation.
def Mathlib.Meta.SetNotationForOrder.elabSSupsetStx' E1 #
Lean.Elab.Term.TermElab
Elaborator for x ⊃ y notation.
def Mathlib.Meta.SetNotationForOrder.elabUnionStx' E1 #
Lean.Elab.Term.TermElab
Elaborator for x ∪ y notation.
def Mathlib.Meta.SetNotationForOrder.elabInterStx' E1 #
Lean.Elab.Term.TermElab
Elaborator for x ∩ y notation.
def Mathlib.Meta.SetNotationForOrder.«binderPred⊆_» E1 #
Lean.ParserDescr
Declare ∀ x ⊆ y, ... as syntax for ∀ x, x ⊆ y → ... and ∃ x ⊆ y, ... as syntax for
∃ x, x ⊆ y ∧ ...
def Mathlib.Meta.SetNotationForOrder.«binderPred⊂_» E1 #
Lean.ParserDescr
Declare ∀ x ⊂ y, ... as syntax for ∀ x, x ⊂ y → ... and ∃ x ⊂ y, ... as syntax for
∃ x, x ⊂ y ∧ ...
def Mathlib.Meta.SetNotationForOrder.«binderPred⊇_» E1 #
Lean.ParserDescr
Declare ∀ x ⊇ y, ... as syntax for ∀ x, x ⊇ y → ... and ∃ x ⊇ y, ... as syntax for
∃ x, x ⊇ y ∧ ...
def Mathlib.Meta.SetNotationForOrder.«binderPred⊃_» E1 #
Lean.ParserDescr
Declare ∀ x ⊃ y, ... as syntax for ∀ x, x ⊃ y → ... and ∃ x ⊃ y, ... as syntax for
∃ x, x ⊃ y ∧ ...
def Mathlib.Meta.SetNotationForOrder.subsetDotNotationLinter E1 #
Batteries.Tactic.Lint.Linter
A temporary linter to help adapt to @[set_notation_for_order].
It gives a warning when a lemma is in the wrong namespace for dot-notation.