Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 29ad1c8

Browse files
committed
feat(order/complete_lattice): add rewrite rules for Inf/Sup/infi/supr for pi and Prop
1 parent 202ac15 commit 29ad1c8

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

order/complete_lattice.lean

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,16 @@ instance complete_lattice_Prop : complete_lattice Prop :=
640640
le_Inf := assume s a h p b hb, h b hb p,
641641
..lattice.bounded_lattice_Prop }
642642

643+
lemma Inf_Prop_eq {s : set Prop} : Inf s = (∀p ∈ s, p) := rfl
644+
645+
lemma Sup_Prop_eq {s : set Prop} : Sup s = (∃p ∈ s, p) := rfl
646+
647+
lemma infi_Prop_eq {ι : Sort*} {p : ι → Prop} : (⨅i, p i) = (∀i, p i) :=
648+
le_antisymm (assume h i, h _ ⟨i, rfl⟩ ) (assume h p ⟨i, eq⟩, eq.symm ▸ h i)
649+
650+
lemma supr_Prop_eq {ι : Sort*} {p : ι → Prop} : (⨆i, p i) = (∃i, p i) :=
651+
le_antisymm (assume ⟨q, ⟨i, (eq : q = p i)⟩, hq⟩, ⟨i, eq ▸ hq⟩) (assume ⟨i, hi⟩, ⟨p i, ⟨i, rfl⟩, hi⟩)
652+
643653
instance pi.complete_lattice {α : Type u} {β : α → Type v} [∀ i, complete_lattice (β i)] :
644654
complete_lattice (Π i, β i) :=
645655
by { pi_instance;
@@ -648,6 +658,24 @@ by { pi_instance;
648658
simp at H, rcases H with ⟨ x, H₀, H₁ ⟩,
649659
subst b, apply a_1 _ H₀ i, } }
650660

661+
lemma Inf_apply
662+
{α : Type u} {β : α → Type v} [∀ i, complete_lattice (β i)] {s : set (Πa, β a)} {a : α} :
663+
(Inf s) a = (⨅f∈s, (f : Πa, β a) a) :=
664+
by rw [← Inf_image]; refl
665+
666+
lemma infi_apply {α : Type u} {β : α → Type v} {ι : Sort*} [∀ i, complete_lattice (β i)]
667+
{f : ι → Πa, β a} {a : α} : (⨅i, f i) a = (⨅i, f i a) :=
668+
by rw [← Inf_range, Inf_apply, infi_range]
669+
670+
lemma Sup_apply
671+
{α : Type u} {β : α → Type v} [∀ i, complete_lattice (β i)] {s : set (Πa, β a)} {a : α} :
672+
(Sup s) a = (⨆f∈s, (f : Πa, β a) a) :=
673+
by rw [← Sup_image]; refl
674+
675+
lemma supr_apply {α : Type u} {β : α → Type v} {ι : Sort*} [∀ i, complete_lattice (β i)]
676+
{f : ι → Πa, β a} {a : α} : (⨆i, f i) a = (⨆i, f i a) :=
677+
by rw [← Sup_range, Sup_apply, supr_range]
678+
651679
section complete_lattice
652680
variables [preorder α] [complete_lattice β]
653681

0 commit comments

Comments
 (0)