fact stringlengths 6 3.84k | type stringclasses 11
values | library stringclasses 32
values | imports listlengths 1 14 | filename stringlengths 20 95 | symbolic_name stringlengths 1 90 | docstring stringlengths 7 20k ⌀ |
|---|---|---|---|---|---|---|
protected IsSymm.sInter {ℛ : Set <| SetRel α α} (hℛ : ∀ R ∈ ℛ, R.IsSymm) :
SetRel.IsSymm (⋂₀ ℛ) where
symm _a _b hab R hR := (hℛ R hR).symm _ _ <| hab R hR | lemma | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | IsSymm.sInter | null |
isSymm_iInter {R : ι → SetRel α α} [∀ i, (R i).IsSymm] :
SetRel.IsSymm (⋂ i, R i) := .sInter <| by simpa | instance | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | isSymm_iInter | null |
isSymm_id : (SetRel.id : SetRel α α).IsSymm where symm _ _ := .symm | instance | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | isSymm_id | null |
isSymm_preimage {f : β → α} [R.IsSymm] : SetRel.IsSymm (Prod.map f f ⁻¹' R) where
symm _ _ := R.symm | instance | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | isSymm_preimage | null |
isSymm_comp_inv : (R ○ R.inv).IsSymm where
symm a c := by rintro ⟨b, hab, hbc⟩; exact ⟨b, hbc, hab⟩ | instance | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | isSymm_comp_inv | null |
isSymm_inv_comp : (R.inv ○ R).IsSymm := isSymm_comp_inv | instance | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | isSymm_inv_comp | null |
isSymm_comp_self [R.IsSymm] : (R ○ R).IsSymm := by simpa using R.isSymm_comp_inv
variable (R) in | instance | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | isSymm_comp_self | null |
symmetrize : SetRel α α := R ∩ R.inv | def | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | symmetrize | The maximal symmetric relation contained in a given relation. |
isSymm_symmetrize : R.symmetrize.IsSymm where symm _ _ := .symm | instance | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | isSymm_symmetrize | null |
symmetrize_subset_self : R.symmetrize ⊆ R := Set.inter_subset_left | lemma | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | symmetrize_subset_self | null |
symmetrize_subset_inv : R.symmetrize ⊆ R.inv := Set.inter_subset_right | lemma | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | symmetrize_subset_inv | null |
subset_symmetrize {S : SetRel α α} : S ⊆ R.symmetrize ↔ S ⊆ R ∧ S ⊆ R.inv :=
Set.subset_inter_iff
@[gcongr] | lemma | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | subset_symmetrize | null |
symmetrize_mono (h : R₁ ⊆ R₂) : R₁.symmetrize ⊆ R₂.symmetrize :=
Set.inter_subset_inter h <| Set.preimage_mono h
/-! ### Transitive relations -/
variable (R) in | lemma | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | symmetrize_mono | null |
protected IsTrans : Prop := IsTrans α (· ~[R] ·)
variable (R) in | abbrev | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | IsTrans | A relation `R` is transitive if `a ~[R] b` and `b ~[R] c` together imply `a ~[R] c`. |
protected trans [R.IsTrans] (hab : a ~[R] b) (hbc : b ~[R] c) : a ~[R] c :=
trans_of (· ~[R] ·) hab hbc | lemma | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | trans | null |
comp_subset_self [R.IsTrans] : R ○ R ⊆ R := fun ⟨_, _⟩ ⟨_, hab, hbc⟩ ↦ R.trans hab hbc | lemma | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | comp_subset_self | null |
comp_eq_self [R.IsRefl] [R.IsTrans] : R ○ R = R :=
subset_antisymm comp_subset_self left_subset_comp | lemma | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | comp_eq_self | null |
isTrans_iff_comp_subset_self : R.IsTrans ↔ R ○ R ⊆ R where
mp _ := comp_subset_self
mpr h := ⟨fun _ _ _ hx hy ↦ h ⟨_, hx, hy⟩⟩ | lemma | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | isTrans_iff_comp_subset_self | null |
isTrans_empty : (∅ : SetRel α α).IsTrans where trans _ _ _ := by simp | instance | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | isTrans_empty | null |
isTrans_univ : SetRel.IsTrans (Set.univ : SetRel α α) where trans _ _ _ := by simp | instance | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | isTrans_univ | null |
isTrans_singleton (x : α × α) : SetRel.IsTrans {x} where trans _ _ _ := by aesop | instance | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | isTrans_singleton | null |
isTrans_inter [R₁.IsTrans] [R₂.IsTrans] : (R₁ ∩ R₂).IsTrans where
trans _a _b _c hab hbc := ⟨R₁.trans hab.1 hbc.1, R₂.trans hab.2 hbc.2⟩ | instance | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | isTrans_inter | null |
protected IsTrans.sInter {ℛ : Set <| SetRel α α} (hℛ : ∀ R ∈ ℛ, R.IsTrans) :
SetRel.IsTrans (⋂₀ ℛ) where
trans _a _b _c hab hbc R hR := (hℛ R hR).trans _ _ _ (hab R hR) <| hbc R hR | lemma | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | IsTrans.sInter | null |
isTrans_iInter {R : ι → SetRel α α} [∀ i, (R i).IsTrans] :
SetRel.IsTrans (⋂ i, R i) := .sInter <| by simpa | instance | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | isTrans_iInter | null |
isTrans_id : (.id : SetRel α α).IsTrans where trans _ _ _ := .trans | instance | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | isTrans_id | null |
isTrans_preimage {f : β → α} [R.IsTrans] : SetRel.IsTrans (Prod.map f f ⁻¹' R) where
trans _ _ _ := R.trans | instance | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | isTrans_preimage | null |
isTrans_symmetrize [R.IsTrans] : R.symmetrize.IsTrans where
trans _a _b _c hab hbc := ⟨R.trans hab.1 hbc.1, R.trans hbc.2 hab.2⟩
variable (R) in | instance | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | isTrans_symmetrize | null |
protected IsIrrefl : Prop := IsIrrefl α (· ~[R] ·)
variable (R a) in | abbrev | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | IsIrrefl | A relation `R` is irreflexive if `¬ a ~[R] a`. |
protected irrefl [R.IsIrrefl] : ¬ a ~[R] a := irrefl_of (· ~[R] ·) _ | lemma | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | irrefl | null |
IsWellFounded : Prop := WellFounded (· ~[R] ·)
variable (R S) in | abbrev | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | IsWellFounded | A relation `R` on a type `α` is well-founded if all elements of `α` are accessible within `R`. |
Hom := (· ~[R] ·) →r (· ~[S] ·) | abbrev | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | Hom | A relation homomorphism with respect to a given pair of relations `R` and `S` s is a function
`f : α → β` such that `a ~[R] b → f a ~[s] f b`. |
graph (f : α → β) : SetRel α β := {(a, b) | f a = b}
@[simp] lemma mem_graph : a ~[f.graph] b ↔ f a = b := .rfl
@[deprecated (since := "2025-07-06")] alias graph_def := mem_graph | def | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | graph | The graph of a function as a relation. |
graph_injective : Injective (graph : (α → β) → SetRel α β) := by
aesop (add simp [Injective, Set.ext_iff])
@[simp] lemma graph_inj {f g : α → β} : f.graph = g.graph ↔ f = g := graph_injective.eq_iff
@[simp] lemma graph_id : graph (id : α → α) = .id := by aesop | theorem | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | graph_injective | null |
graph_comp (f : β → γ) (g : α → β) : graph (f ∘ g) = graph g ○ graph f := by aesop | theorem | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | graph_comp | null |
Equiv.graph_inv (f : α ≃ β) : (f.symm : β → α).graph = SetRel.inv (f : α → β).graph := by
aesop | theorem | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | Equiv.graph_inv | null |
SetRel.exists_graph_eq_iff (R : SetRel α β) :
(∃! f, Function.graph f = R) ↔ ∀ a, ∃! b, a ~[R] b := by
constructor
· rintro ⟨f, rfl, _⟩ x
simp
intro h
choose f hf using fun x ↦ (h x).exists
refine ⟨f, ?_, by aesop⟩
ext ⟨a, b⟩
constructor
· aesop
· exact (h _).unique (hf _)
@[deprecated (since ... | lemma | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | SetRel.exists_graph_eq_iff | null |
image_eq (f : α → β) (s : Set α) : f '' s = (Function.graph f).image s := by
rfl | theorem | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | image_eq | null |
preimage_eq (f : α → β) (s : Set β) : f ⁻¹' s = (Function.graph f).preimage s := by
simp [Set.preimage, SetRel.preimage] | theorem | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | preimage_eq | null |
preimage_eq_core (f : α → β) (s : Set β) : f ⁻¹' s = (Function.graph f).core s := by
simp [Set.preimage, SetRel.core] | theorem | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | preimage_eq_core | null |
Rel (α β : Type*) : Type _ := α → β → Prop | abbrev | Data | [
"Mathlib.Data.Set.Prod",
"Mathlib.Order.RelIso.Basic",
"Mathlib.Order.SetNotation"
] | Mathlib/Data/Rel.lean | Rel | A shorthand for `α → β → Prop`.
Consider using `SetRel` instead if you want extra API for relations. |
Semiquot (α : Type*) where mk' ::
/-- Set containing some element of `α` -/
s : Set α
/-- Assertion of non-emptiness via `Trunc` -/
val : Trunc s | structure | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | Semiquot | A member of `Semiquot α` is classically a nonempty `Set α`,
and in the VM is represented by an element of `α`; the relation
between these is that the VM element is required to be a member
of the set `s`. The specific element of `s` that the VM computes
is hidden by a quotient construction, allowing for the repr... |
mk {a : α} {s : Set α} (h : a ∈ s) : Semiquot α :=
⟨s, Trunc.mk ⟨a, h⟩⟩ | def | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | mk | Construct a `Semiquot α` from `h : a ∈ s` where `s : Set α`. |
ext_s {q₁ q₂ : Semiquot α} : q₁ = q₂ ↔ q₁.s = q₂.s := by
refine ⟨congr_arg _, fun h => ?_⟩
obtain ⟨_, v₁⟩ := q₁; obtain ⟨_, v₂⟩ := q₂; congr
exact Subsingleton.helim (congrArg Trunc (congrArg Set.Elem h)) v₁ v₂ | theorem | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | ext_s | null |
ext {q₁ q₂ : Semiquot α} : q₁ = q₂ ↔ ∀ a, a ∈ q₁ ↔ a ∈ q₂ :=
ext_s.trans Set.ext_iff | theorem | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | ext | null |
exists_mem (q : Semiquot α) : ∃ a, a ∈ q :=
let ⟨⟨a, h⟩, _⟩ := q.2.exists_rep
⟨a, h⟩ | theorem | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | exists_mem | null |
eq_mk_of_mem {q : Semiquot α} {a : α} (h : a ∈ q) : q = @mk _ a q.1 h :=
ext_s.2 rfl | theorem | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | eq_mk_of_mem | null |
nonempty (q : Semiquot α) : q.s.Nonempty :=
q.exists_mem | theorem | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | nonempty | null |
protected pure (a : α) : Semiquot α :=
mk (Set.mem_singleton a)
@[simp] | def | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | pure | `pure a` is `a` reinterpreted as an unspecified element of `{a}`. |
mem_pure' {a b : α} : a ∈ Semiquot.pure b ↔ a = b :=
Set.mem_singleton_iff | theorem | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | mem_pure' | null |
blur' (q : Semiquot α) {s : Set α} (h : q.s ⊆ s) : Semiquot α :=
⟨s, Trunc.lift (fun a : q.s => Trunc.mk ⟨a.1, h a.2⟩) (fun _ _ => Trunc.eq _ _) q.2⟩ | def | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | blur' | Replace `s` in a `Semiquot` with a superset. |
blur (s : Set α) (q : Semiquot α) : Semiquot α :=
blur' q (s.subset_union_right (t := q.s)) | def | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | blur | Replace `s` in a `q : Semiquot α` with a union `s ∪ q.s` |
blur_eq_blur' (q : Semiquot α) (s : Set α) (h : q.s ⊆ s) : blur s q = blur' q h := by
unfold blur; congr; exact Set.union_eq_self_of_subset_right h
@[simp] | theorem | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | blur_eq_blur' | null |
mem_blur' (q : Semiquot α) {s : Set α} (h : q.s ⊆ s) {a : α} : a ∈ blur' q h ↔ a ∈ s :=
Iff.rfl | theorem | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | mem_blur' | null |
ofTrunc (q : Trunc α) : Semiquot α :=
⟨Set.univ, q.map fun a => ⟨a, trivial⟩⟩ | def | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | ofTrunc | Convert a `Trunc α` to a `Semiquot α`. |
toTrunc (q : Semiquot α) : Trunc α :=
q.2.map Subtype.val | def | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | toTrunc | Convert a `Semiquot α` to a `Trunc α`. |
liftOn (q : Semiquot α) (f : α → β) (h : ∀ a ∈ q, ∀ b ∈ q, f a = f b) : β :=
Trunc.liftOn q.2 (fun x => f x.1) fun x y => h _ x.2 _ y.2 | def | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | liftOn | If `f` is a constant on `q.s`, then `q.liftOn f` is the value of `f`
at any point of `q`. |
liftOn_ofMem (q : Semiquot α) (f : α → β)
(h : ∀ a ∈ q, ∀ b ∈ q, f a = f b) (a : α) (aq : a ∈ q) : liftOn q f h = f a := by
revert h; rw [eq_mk_of_mem aq]; intro; rfl | theorem | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | liftOn_ofMem | null |
map (f : α → β) (q : Semiquot α) : Semiquot β :=
⟨f '' q.1, q.2.map fun x => ⟨f x.1, Set.mem_image_of_mem _ x.2⟩⟩
@[simp] | def | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | map | Apply a function to the unknown value stored in a `Semiquot α`. |
mem_map (f : α → β) (q : Semiquot α) (b : β) : b ∈ map f q ↔ ∃ a, a ∈ q ∧ f a = b :=
Set.mem_image _ _ _ | theorem | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | mem_map | null |
bind (q : Semiquot α) (f : α → Semiquot β) : Semiquot β :=
⟨⋃ a ∈ q.1, (f a).1, q.2.bind fun a => (f a.1).2.map fun b => ⟨b.1, Set.mem_biUnion a.2 b.2⟩⟩
@[simp] | def | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | bind | Apply a function returning a `Semiquot` to a `Semiquot`. |
mem_bind (q : Semiquot α) (f : α → Semiquot β) (b : β) :
b ∈ bind q f ↔ ∃ a ∈ q, b ∈ f a := by simp_rw [← exists_prop]; exact Set.mem_iUnion₂ | theorem | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | mem_bind | null |
@[simp]
map_def {β} : ((· <$> ·) : (α → β) → Semiquot α → Semiquot β) = map :=
rfl
@[simp] | theorem | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | map_def | null |
bind_def {β} : ((· >>= ·) : Semiquot α → (α → Semiquot β) → Semiquot β) = bind :=
rfl
@[simp] | theorem | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | bind_def | null |
mem_pure {a b : α} : a ∈ (pure b : Semiquot α) ↔ a = b :=
Set.mem_singleton_iff | theorem | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | mem_pure | null |
mem_pure_self (a : α) : a ∈ (pure a : Semiquot α) :=
Set.mem_singleton a
@[simp] | theorem | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | mem_pure_self | null |
pure_inj {a b : α} : (pure a : Semiquot α) = pure b ↔ a = b :=
ext_s.trans Set.singleton_eq_singleton_iff | theorem | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | pure_inj | null |
partialOrder : PartialOrder (Semiquot α) where
le s t := ∀ ⦃x⦄, x ∈ s → x ∈ t
le_refl _ := Set.Subset.refl _
le_trans _ _ _ := Set.Subset.trans
le_antisymm _ _ h₁ h₂ := ext_s.2 (Set.Subset.antisymm h₁ h₂) | instance | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | partialOrder | null |
@[simp]
pure_le {a : α} {s : Semiquot α} : pure a ≤ s ↔ a ∈ s :=
Set.singleton_subset_iff | theorem | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | pure_le | null |
IsPure (q : Semiquot α) : Prop :=
∀ a ∈ q, ∀ b ∈ q, a = b | def | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | IsPure | Assert that a `Semiquot` contains only one possible value. |
get (q : Semiquot α) (h : q.IsPure) : α :=
liftOn q id h | def | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | get | Extract the value from an `IsPure` semiquotient. |
get_mem {q : Semiquot α} (p) : get q p ∈ q := by
let ⟨a, h⟩ := exists_mem q
unfold get; rw [liftOn_ofMem q _ _ a h]; exact h | theorem | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | get_mem | null |
eq_pure {q : Semiquot α} (p) : q = pure (get q p) :=
ext.2 fun a => by simpa using ⟨fun h => p _ h _ (get_mem _), fun e => e.symm ▸ get_mem _⟩
@[simp] | theorem | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | eq_pure | null |
pure_isPure (a : α) : IsPure (pure a)
| b, ab, c, ac => by
rw [mem_pure] at ab ac
rwa [← ac] at ab | theorem | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | pure_isPure | null |
isPure_iff {s : Semiquot α} : IsPure s ↔ ∃ a, s = pure a :=
⟨fun h => ⟨_, eq_pure h⟩, fun ⟨_, e⟩ => e.symm ▸ pure_isPure _⟩ | theorem | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | isPure_iff | null |
IsPure.mono {s t : Semiquot α} (st : s ≤ t) (h : IsPure t) : IsPure s
| _, as, _, bs => h _ (st as) _ (st bs) | theorem | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | IsPure.mono | null |
IsPure.min {s t : Semiquot α} (h : IsPure t) : s ≤ t ↔ s = t :=
⟨fun st =>
le_antisymm st <| by
rw [eq_pure h, eq_pure (h.mono st)]; simpa using h _ (get_mem _) _ (st <| get_mem _),
le_of_eq⟩ | theorem | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | IsPure.min | null |
isPure_of_subsingleton [Subsingleton α] (q : Semiquot α) : IsPure q
| _, _, _, _ => Subsingleton.elim _ _ | theorem | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | isPure_of_subsingleton | null |
univ [Inhabited α] : Semiquot α :=
mk <| Set.mem_univ default | def | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | univ | `univ : Semiquot α` represents an unspecified element of `univ : Set α`. |
@[simp]
mem_univ [Inhabited α] : ∀ a, a ∈ @univ α _ :=
@Set.mem_univ α
@[congr] | theorem | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | mem_univ | null |
univ_unique (I J : Inhabited α) : @univ _ I = @univ _ J :=
ext.2 fun a => refl (a ∈ univ)
@[simp] | theorem | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | univ_unique | null |
isPure_univ [Inhabited α] : @IsPure α univ ↔ Subsingleton α :=
⟨fun h => ⟨fun a b => h a trivial b trivial⟩, fun ⟨h⟩ a _ b _ => h a b⟩ | theorem | Data | [
"Mathlib.Data.Set.Lattice"
] | Mathlib/Data/Semiquot.lean | isPure_univ | null |
SProd (α : Type u) (β : Type v) (γ : outParam (Type w)) where
/-- The Cartesian product `s ×ˢ t` is the set of `(a, b)` such that `a ∈ s` and `b ∈ t`. -/
sprod : α → β → γ
@[inherit_doc SProd.sprod] infixr:82 " ×ˢ " => SProd.sprod
macro_rules | `($x ×ˢ $y) => `(fbinop% SProd.sprod $x $y) | class | Data | [
"Mathlib.Tactic.FBinop"
] | Mathlib/Data/SProd.lean | SProd | Notation type class for the set product `×ˢ`. |
protected forall' {q : ∀ x, p x → Prop} : (∀ x h, q x h) ↔ ∀ x : { a // p a }, q x x.2 :=
(@Subtype.forall _ _ fun x ↦ q x.1 x.2).symm | theorem | Data | [
"Mathlib.Logic.Function.Basic",
"Mathlib.Tactic.AdaptationNote",
"Mathlib.Tactic.Simps.Basic"
] | Mathlib/Data/Subtype.lean | forall' | A version of `x.property` or `x.2` where `p` is syntactically applied to the coercion of `x`
instead of `x.1`. A similar result is `Subtype.mem` in `Mathlib/Data/Set/Basic.lean`. -/
-- This is a leftover from Lean 3: it is identical to `Subtype.property`, and should be deprecated.
theorem prop (x : Subtype p) : p x :... |
protected exists' {q : ∀ x, p x → Prop} : (∃ x h, q x h) ↔ ∃ x : { a // p a }, q x x.2 :=
(@Subtype.exists _ _ fun x ↦ q x.1 x.2).symm | theorem | Data | [
"Mathlib.Logic.Function.Basic",
"Mathlib.Tactic.AdaptationNote",
"Mathlib.Tactic.Simps.Basic"
] | Mathlib/Data/Subtype.lean | exists' | An alternative version of `Subtype.exists`. This one is useful if Lean cannot figure out `q`
when using `Subtype.exists` from right to left. |
heq_iff_coe_eq (h : ∀ x, p x ↔ q x) {a1 : { x // p x }} {a2 : { x // q x }} :
a1 ≍ a2 ↔ (a1 : α) = (a2 : α) :=
Eq.rec
(motive := fun (pp : (α → Prop)) _ ↦ ∀ a2' : {x // pp x}, a1 ≍ a2' ↔ (a1 : α) = (a2' : α))
(by grind) (funext <| fun x ↦ propext (h x)) a2 | theorem | Data | [
"Mathlib.Logic.Function.Basic",
"Mathlib.Tactic.AdaptationNote",
"Mathlib.Tactic.Simps.Basic"
] | Mathlib/Data/Subtype.lean | heq_iff_coe_eq | null |
heq_iff_coe_heq {α β : Sort _} {p : α → Prop} {q : β → Prop} {a : {x // p x}}
{b : {y // q y}} (h : α = β) (h' : p ≍ q) : a ≍ b ↔ (a : α) ≍ (b : β) := by
subst h
subst h'
grind
@[deprecated Subtype.ext (since := "2025-09-10")] | lemma | Data | [
"Mathlib.Logic.Function.Basic",
"Mathlib.Tactic.AdaptationNote",
"Mathlib.Tactic.Simps.Basic"
] | Mathlib/Data/Subtype.lean | heq_iff_coe_heq | null |
ext_val {a1 a2 : { x // p x }} : a1.1 = a2.1 → a1 = a2 :=
Subtype.ext
@[deprecated Subtype.ext_iff (since := "2025-09-10")] | theorem | Data | [
"Mathlib.Logic.Function.Basic",
"Mathlib.Tactic.AdaptationNote",
"Mathlib.Tactic.Simps.Basic"
] | Mathlib/Data/Subtype.lean | ext_val | null |
ext_iff_val {a1 a2 : { x // p x }} : a1 = a2 ↔ a1.1 = a2.1 :=
Subtype.ext_iff
@[simp] | theorem | Data | [
"Mathlib.Logic.Function.Basic",
"Mathlib.Tactic.AdaptationNote",
"Mathlib.Tactic.Simps.Basic"
] | Mathlib/Data/Subtype.lean | ext_iff_val | null |
coe_eta (a : { a // p a }) (h : p a) : mk (↑a) h = a :=
Subtype.ext rfl | theorem | Data | [
"Mathlib.Logic.Function.Basic",
"Mathlib.Tactic.AdaptationNote",
"Mathlib.Tactic.Simps.Basic"
] | Mathlib/Data/Subtype.lean | coe_eta | null |
coe_mk (a h) : (@mk α p a h : α) = a :=
rfl | theorem | Data | [
"Mathlib.Logic.Function.Basic",
"Mathlib.Tactic.AdaptationNote",
"Mathlib.Tactic.Simps.Basic"
] | Mathlib/Data/Subtype.lean | coe_mk | null |
mk_eq_mk {a h a' h'} : @mk α p a h = @mk α p a' h' ↔ a = a' := by simp | theorem | Data | [
"Mathlib.Logic.Function.Basic",
"Mathlib.Tactic.AdaptationNote",
"Mathlib.Tactic.Simps.Basic"
] | Mathlib/Data/Subtype.lean | mk_eq_mk | Restatement of `Subtype.mk.injEq` as an iff. |
coe_eq_of_eq_mk {a : { a // p a }} {b : α} (h : ↑a = b) : a = ⟨b, h ▸ a.2⟩ :=
Subtype.ext h | theorem | Data | [
"Mathlib.Logic.Function.Basic",
"Mathlib.Tactic.AdaptationNote",
"Mathlib.Tactic.Simps.Basic"
] | Mathlib/Data/Subtype.lean | coe_eq_of_eq_mk | null |
coe_eq_iff {a : { a // p a }} {b : α} : ↑a = b ↔ ∃ h, a = ⟨b, h⟩ := by grind | theorem | Data | [
"Mathlib.Logic.Function.Basic",
"Mathlib.Tactic.AdaptationNote",
"Mathlib.Tactic.Simps.Basic"
] | Mathlib/Data/Subtype.lean | coe_eq_iff | null |
coe_injective : Injective (fun (a : Subtype p) ↦ (a : α)) := fun _ _ ↦ Subtype.ext
@[simp] theorem val_injective : Injective (@val _ p) :=
coe_injective | theorem | Data | [
"Mathlib.Logic.Function.Basic",
"Mathlib.Tactic.AdaptationNote",
"Mathlib.Tactic.Simps.Basic"
] | Mathlib/Data/Subtype.lean | coe_injective | null |
coe_inj {a b : Subtype p} : (a : α) = b ↔ a = b :=
coe_injective.eq_iff | theorem | Data | [
"Mathlib.Logic.Function.Basic",
"Mathlib.Tactic.AdaptationNote",
"Mathlib.Tactic.Simps.Basic"
] | Mathlib/Data/Subtype.lean | coe_inj | null |
val_inj {a b : Subtype p} : a.val = b.val ↔ a = b :=
coe_inj | theorem | Data | [
"Mathlib.Logic.Function.Basic",
"Mathlib.Tactic.AdaptationNote",
"Mathlib.Tactic.Simps.Basic"
] | Mathlib/Data/Subtype.lean | val_inj | null |
coe_ne_coe {a b : Subtype p} : (a : α) ≠ b ↔ a ≠ b := coe_injective.ne_iff
@[simp] | lemma | Data | [
"Mathlib.Logic.Function.Basic",
"Mathlib.Tactic.AdaptationNote",
"Mathlib.Tactic.Simps.Basic"
] | Mathlib/Data/Subtype.lean | coe_ne_coe | null |
_root_.exists_eq_subtype_mk_iff {a : Subtype p} {b : α} :
(∃ h : p b, a = Subtype.mk b h) ↔ ↑a = b :=
coe_eq_iff.symm
@[simp] | theorem | Data | [
"Mathlib.Logic.Function.Basic",
"Mathlib.Tactic.AdaptationNote",
"Mathlib.Tactic.Simps.Basic"
] | Mathlib/Data/Subtype.lean | _root_.exists_eq_subtype_mk_iff | null |
_root_.exists_subtype_mk_eq_iff {a : Subtype p} {b : α} :
(∃ h : p b, Subtype.mk b h = a) ↔ b = a := by grind | theorem | Data | [
"Mathlib.Logic.Function.Basic",
"Mathlib.Tactic.AdaptationNote",
"Mathlib.Tactic.Simps.Basic"
] | Mathlib/Data/Subtype.lean | _root_.exists_subtype_mk_eq_iff | null |
_root_.Function.extend_val_apply {p : β → Prop} {g : {x // p x} → γ} {j : β → γ}
{b : β} (hb : p b) : val.extend g j b = g ⟨b, hb⟩ :=
val_injective.extend_apply g j ⟨b, hb⟩ | theorem | Data | [
"Mathlib.Logic.Function.Basic",
"Mathlib.Tactic.AdaptationNote",
"Mathlib.Tactic.Simps.Basic"
] | Mathlib/Data/Subtype.lean | _root_.Function.extend_val_apply | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.