l3lab/ntp-mathlib huggingface dataset:
/-- **Birkhoff's Representation Theorem**. Any nonempty finite distributive lattice is isomorphic to
the lattice of lower sets of its sup-irreducible elements. -/
noncomputable def OrderIso.lowerSetSupIrred : α ≃o LowerSet {a : α // SupIrred a} :=
  Equiv.toOrderIso
    { toFun := fun a ↦ ⟨{b | ↑b ≤ a}, fun b c hcb hba ↦ hba.trans' hcb⟩
      invFun := fun s ↦ (s : Set {a : α // SupIrred a}).toFinset.sup (↑)
      left_inv := fun a ↦ by
        refine' le_antisymm (Finset.sup_le fun b ↦ Set.mem_toFinset.1) _
        obtain ⟨s, rfl, hs⟩ := exists_supIrred_decomposition a
        exact Finset.sup_le fun i hi ↦
          le_sup_of_le (b := ⟨i, hs hi⟩) (Set.mem_toFinset.2 $ le_sup (f := id) hi) le_rfl
      right_inv := fun s ↦ by
        ext a
        dsimp
        refine' ⟨fun ha ↦ _, fun ha ↦ _⟩
        · obtain ⟨i, hi, ha⟩ := a.2.supPrime.le_finset_sup.1 ha
          exact s.lower ha (Set.mem_toFinset.1 hi)
        · dsimp
          

Proof state:
case a.h.refine'_2
α : Type u_1
inst✝² : DistribLattice α
inst✝¹ : Fintype α
inst✝ : OrderBot α
s : LowerSet { a // SupIrred a }
a : { a // SupIrred a }
ha : a ∈ ↑s
⊢ ↑a ≤ sup (Set.toFinset ↑s) Subtype.val

Next tactic:
exact le_sup (Set.mem_toFinset.2 ha)
/-- Any nonempty finite distributive lattice is isomorphic to its lattice of sup-irreducible lower
sets. This is the other unitor of Birkhoff's representation theorem. -/
noncomputable def OrderIso.supIrredLowerSet : α ≃o {s : LowerSet α // SupIrred s} :=
  Equiv.toOrderIso
    { toFun := fun a ↦ ⟨LowerSet.Iic a, LowerSet.supIrred_Iic _⟩
      invFun := fun s ↦ ((s : LowerSet α) : Set α).toFinset.sup id
      left_inv := fun a ↦ by
        

Proof state:
α : Type u_1
inst✝² : DistribLattice α
inst✝¹ : Fintype α
inst✝ : OrderBot α
a : α
⊢ (fun s => sup (Set.toFinset ↑↑s) id)
      ((fun a => { val := LowerSet.Iic a, property := (_ : SupIrred (LowerSet.Iic a)) }) a) =
    a

Next tactic:
have : LocallyFiniteOrder α := Fintype.toLocallyFiniteOrder
/-- Any nonempty finite distributive lattice is isomorphic to its lattice of sup-irreducible lower
sets. This is the other unitor of Birkhoff's representation theorem. -/
noncomputable def OrderIso.supIrredLowerSet : α ≃o {s : LowerSet α // SupIrred s} :=
  Equiv.toOrderIso
    { toFun := fun a ↦ ⟨LowerSet.Iic a, LowerSet.supIrred_Iic _⟩
      invFun := fun s ↦ ((s : LowerSet α) : Set α).toFinset.sup id
      left_inv := fun a ↦ by
        have : LocallyFiniteOrder α := Fintype.toLocallyFiniteOrder
        

Proof state:
α : Type u_1
inst✝² : DistribLattice α
inst✝¹ : Fintype α
inst✝ : OrderBot α
a : α
this : LocallyFiniteOrder α
⊢ (fun s => sup (Set.toFinset ↑↑s) id)
      ((fun a => { val := LowerSet.Iic a, property := (_ : SupIrred (LowerSet.Iic a)) }) a) =
    a

Next tactic:
simp
/-- Any nonempty finite distributive lattice is isomorphic to its lattice of sup-irreducible lower
sets. This is the other unitor of Birkhoff's representation theorem. -/
noncomputable def OrderIso.supIrredLowerSet : α ≃o {s : LowerSet α // SupIrred s} :=
  Equiv.toOrderIso
    { toFun := fun a ↦ ⟨LowerSet.Iic a, LowerSet.supIrred_Iic _⟩
      invFun := fun s ↦ ((s : LowerSet α) : Set α).toFinset.sup id
      left_inv := fun a ↦ by
        have : LocallyFiniteOrder α := Fintype.toLocallyFiniteOrder
        simp
      right_inv := by
        

Proof state:
α : Type u_1
inst✝² : DistribLattice α
inst✝¹ : Fintype α
inst✝ : OrderBot α
⊢ Function.RightInverse (fun s => sup (Set.toFinset ↑↑s) id) fun a =>
    { val := LowerSet.Iic a, property := (_ : SupIrred (LowerSet.Iic a)) }

Next tactic:
classical
        have : LocallyFiniteOrder α := Fintype.toLocallyFiniteOrder
        rintro ⟨s, hs⟩
        obtain ⟨a, rfl⟩ := LowerSet.supIrred_iff_of_finite.1 hs
        simp
/-- Any nonempty finite distributive lattice is isomorphic to its lattice of sup-irreducible lower
sets. This is the other unitor of Birkhoff's representation theorem. -/
noncomputable def OrderIso.supIrredLowerSet : α ≃o {s : LowerSet α // SupIrred s} :=
  Equiv.toOrderIso
    { toFun := fun a ↦ ⟨LowerSet.Iic a, LowerSet.supIrred_Iic _⟩
      invFun := fun s ↦ ((s : LowerSet α) : Set α).toFinset.sup id
      left_inv := fun a ↦ by
        have : LocallyFiniteOrder α := Fintype.toLocallyFiniteOrder
        simp
      right_inv := by
        classical
        

Proof state:
α : Type u_1
inst✝² : DistribLattice α
inst✝¹ : Fintype α
inst✝ : OrderBot α
⊢ Function.RightInverse (fun s => sup (Set.toFinset ↑↑s) id) fun a =>
    { val := LowerSet.Iic a, property := (_ : SupIrred (LowerSet.Iic a)) }

Next tactic:
have : LocallyFiniteOrder α := Fintype.toLocallyFiniteOrder
/-- Any nonempty finite distributive lattice is isomorphic to its lattice of sup-irreducible lower
sets. This is the other unitor of Birkhoff's representation theorem. -/
noncomputable def OrderIso.supIrredLowerSet : α ≃o {s : LowerSet α // SupIrred s} :=
  Equiv.toOrderIso
    { toFun := fun a ↦ ⟨LowerSet.Iic a, LowerSet.supIrred_Iic _⟩
      invFun := fun s ↦ ((s : LowerSet α) : Set α).toFinset.sup id
      left_inv := fun a ↦ by
        have : LocallyFiniteOrder α := Fintype.toLocallyFiniteOrder
        simp
      right_inv := by
        classical
        have : LocallyFiniteOrder α := Fintype.toLocallyFiniteOrder
        

Proof state:
α : Type u_1
inst✝² : DistribLattice α
inst✝¹ : Fintype α
inst✝ : OrderBot α
this : LocallyFiniteOrder α
⊢ Function.RightInverse (fun s => sup (Set.toFinset ↑↑s) id) fun a =>
    { val := LowerSet.Iic a, property := (_ : SupIrred (LowerSet.Iic a)) }

Next tactic:
rintro ⟨s, hs⟩
/-- Any nonempty finite distributive lattice is isomorphic to its lattice of sup-irreducible lower
sets. This is the other unitor of Birkhoff's representation theorem. -/
noncomputable def OrderIso.supIrredLowerSet : α ≃o {s : LowerSet α // SupIrred s} :=
  Equiv.toOrderIso
    { toFun := fun a ↦ ⟨LowerSet.Iic a, LowerSet.supIrred_Iic _⟩
      invFun := fun s ↦ ((s : LowerSet α) : Set α).toFinset.sup id
      left_inv := fun a ↦ by
        have : LocallyFiniteOrder α := Fintype.toLocallyFiniteOrder
        simp
      right_inv := by
        classical
        have : LocallyFiniteOrder α := Fintype.toLocallyFiniteOrder
        rintro ⟨s, hs⟩
        

Proof state:
case mk
α : Type u_1
inst✝² : DistribLattice α
inst✝¹ : Fintype α
inst✝ : OrderBot α
this : LocallyFiniteOrder α
s : LowerSet α
hs : SupIrred s
⊢ (fun a => { val := LowerSet.Iic a, property := (_ : SupIrred (LowerSet.Iic a)) })
      ((fun s => sup (Set.toFinset ↑↑s) id) { val := s, property := hs }) =
    { val := s, property := hs }

Next tactic:
obtain ⟨a, rfl⟩ := LowerSet.supIrred_iff_of_finite.1 hs
/-- Any nonempty finite distributive lattice is isomorphic to its lattice of sup-irreducible lower
sets. This is the other unitor of Birkhoff's representation theorem. -/
noncomputable def OrderIso.supIrredLowerSet : α ≃o {s : LowerSet α // SupIrred s} :=
  Equiv.toOrderIso
    { toFun := fun a ↦ ⟨LowerSet.Iic a, LowerSet.supIrred_Iic _⟩
      invFun := fun s ↦ ((s : LowerSet α) : Set α).toFinset.sup id
      left_inv := fun a ↦ by
        have : LocallyFiniteOrder α := Fintype.toLocallyFiniteOrder
        simp
      right_inv := by
        classical
        have : LocallyFiniteOrder α := Fintype.toLocallyFiniteOrder
        rintro ⟨s, hs⟩
        obtain ⟨a, rfl⟩ := LowerSet.supIrred_iff_of_finite.1 hs
        

Proof state:
case mk.intro
α : Type u_1
inst✝² : DistribLattice α
inst✝¹ : Fintype α
inst✝ : OrderBot α
this : LocallyFiniteOrder α
a : α
hs : SupIrred (LowerSet.Iic a)
⊢ (fun a => { val := LowerSet.Iic a, property := (_ : SupIrred (LowerSet.Iic a)) })
      ((fun s => sup (Set.toFinset ↑↑s) id) { val := LowerSet.Iic a, property := hs }) =
    { val := LowerSet.Iic a, property := hs }

Next tactic:
simp
/-- **Birkhoff's Representation Theorem**. Any finite distributive lattice can be embedded in a
powerset lattice. -/
noncomputable def birkhoffSet : α ↪o Set {a : α // SupIrred a} := by
  

Proof state:
α : Type u_1
inst✝² : DistribLattice α
inst✝¹ : Fintype α
inst✝ : DecidablePred SupIrred
⊢ α ↪o Set { a // SupIrred a }

Next tactic:
by_cases h : IsEmpty α
/-- **Birkhoff's Representation Theorem**. Any finite distributive lattice can be embedded in a
powerset lattice. -/
noncomputable def birkhoffSet : α ↪o Set {a : α // SupIrred a} := by
  by_cases h : IsEmpty α
  · 

Proof state:
case pos
α : Type u_1
inst✝² : DistribLattice α
inst✝¹ : Fintype α
inst✝ : DecidablePred SupIrred
h : IsEmpty α
⊢ α ↪o Set { a // SupIrred a }

Next tactic:
exact OrderEmbedding.ofIsEmpty
/-- **Birkhoff's Representation Theorem**. Any finite distributive lattice can be embedded in a
powerset lattice. -/
noncomputable def birkhoffSet : α ↪o Set {a : α // SupIrred a} := by
  by_cases h : IsEmpty α
  · exact OrderEmbedding.ofIsEmpty
  

Proof state:
case neg
α : Type u_1
inst✝² : DistribLattice α
inst✝¹ : Fintype α
inst✝ : DecidablePred SupIrred
h : ¬IsEmpty α
⊢ α ↪o Set { a // SupIrred a }

Next tactic:
rw [not_isEmpty_iff] at h
/-- **Birkhoff's Representation Theorem**. Any finite distributive lattice can be embedded in a
powerset lattice. -/
noncomputable def birkhoffSet : α ↪o Set {a : α // SupIrred a} := by
  by_cases h : IsEmpty α
  · exact OrderEmbedding.ofIsEmpty
  rw [not_isEmpty_iff] at h
  

Proof state:
case neg
α : Type u_1
inst✝² : DistribLattice α
inst✝¹ : Fintype α
inst✝ : DecidablePred SupIrred
h : Nonempty α
⊢ α ↪o Set { a // SupIrred a }

Next tactic:
have := Fintype.toOrderBot α
/-- **Birkhoff's Representation Theorem**. Any finite distributive lattice can be embedded in a
powerset lattice. -/
noncomputable def birkhoffSet : α ↪o Set {a : α // SupIrred a} := by
  by_cases h : IsEmpty α
  · exact OrderEmbedding.ofIsEmpty
  rw [not_isEmpty_iff] at h
  have := Fintype.toOrderBot α
  

Proof state:
case neg
α : Type u_1
inst✝² : DistribLattice α
inst✝¹ : Fintype α
inst✝ : DecidablePred SupIrred
h : Nonempty α
this : OrderBot α
⊢ α ↪o Set { a // SupIrred a }

Next tactic:
exact OrderIso.lowerSetSupIrred.toOrderEmbedding.trans ⟨⟨_, SetLike.coe_injective⟩, Iff.rfl⟩
/-- **Birkhoff's Representation Theorem**. Any finite distributive lattice can be embedded in a
powerset lattice. -/
noncomputable def birkhoffFinset : α ↪o Finset {a : α // SupIrred a} := by
  

Proof state:
α : Type u_1
inst✝² : DistribLattice α
inst✝¹ : Fintype α
inst✝ : DecidablePred SupIrred
⊢ α ↪o Finset { a // SupIrred a }

Next tactic:
exact (birkhoffSet _).trans Fintype.finsetOrderIsoSet.symm.toOrderEmbedding
@[simp] lemma coe_birkhoffFinset (a : α) : birkhoffFinset α a = birkhoffSet α a := by
  

Proof state:
α : Type u_1
inst✝² : DistribLattice α
inst✝¹ : Fintype α
inst✝ : DecidablePred SupIrred
a : α
⊢ ↑((birkhoffFinset α) a) = (birkhoffSet α) a

Next tactic:
classical
  -- TODO: This should be a single `simp` call but `simp` refuses to use
  -- `OrderIso.coe_toOrderEmbedding` and `Fintype.coe_finsetOrderIsoSet_symm`
  simp [birkhoffFinset]
  rw [OrderIso.coe_toOrderEmbedding, Fintype.coe_finsetOrderIsoSet_symm]
  simp
@[simp] lemma coe_birkhoffFinset (a : α) : birkhoffFinset α a = birkhoffSet α a := by
  classical
  -- TODO: This should be a single `simp` call but `simp` refuses to use
  -- `OrderIso.coe_toOrderEmbedding` and `Fintype.coe_finsetOrderIsoSet_symm`
  

Proof state:
α : Type u_1
inst✝² : DistribLattice α
inst✝¹ : Fintype α
inst✝ : DecidablePred SupIrred
a : α
⊢ ↑((birkhoffFinset α) a) = (birkhoffSet α) a

Next tactic:
simp [birkhoffFinset]
@[simp] lemma coe_birkhoffFinset (a : α) : birkhoffFinset α a = birkhoffSet α a := by
  classical
  -- TODO: This should be a single `simp` call but `simp` refuses to use
  -- `OrderIso.coe_toOrderEmbedding` and `Fintype.coe_finsetOrderIsoSet_symm`
  simp [birkhoffFinset]
  

Proof state:
α : Type u_1
inst✝² : DistribLattice α
inst✝¹ : Fintype α
inst✝ : DecidablePred SupIrred
a : α
⊢ ↑((OrderIso.toOrderEmbedding (OrderIso.symm Fintype.finsetOrderIsoSet)) ((birkhoffSet α) a)) = (birkhoffSet α) a

Next tactic:
rw [OrderIso.coe_toOrderEmbedding, Fintype.coe_finsetOrderIsoSet_symm]
@[simp] lemma coe_birkhoffFinset (a : α) : birkhoffFinset α a = birkhoffSet α a := by
  classical
  -- TODO: This should be a single `simp` call but `simp` refuses to use
  -- `OrderIso.coe_toOrderEmbedding` and `Fintype.coe_finsetOrderIsoSet_symm`
  simp [birkhoffFinset]
  rw [OrderIso.coe_toOrderEmbedding, Fintype.coe_finsetOrderIsoSet_symm]
  

Proof state:
α : Type u_1
inst✝² : DistribLattice α
inst✝¹ : Fintype α
inst✝ : DecidablePred SupIrred
a : α
⊢ ↑(Fintype.finsetEquivSet.symm ((birkhoffSet α) a)) = (birkhoffSet α) a

Next tactic:
simp
@[simp] lemma birkhoffSet_sup (a b : α) :
    birkhoffSet α (a ⊔ b) = birkhoffSet α a ∪ birkhoffSet α b := by
  

Proof state:
α : Type u_1
inst✝² : DistribLattice α
inst✝¹ : Fintype α
inst✝ : DecidablePred SupIrred
a b : α
⊢ (birkhoffSet α) (a ⊔ b) = (birkhoffSet α) a ∪ (birkhoffSet α) b

Next tactic:
unfold OrderEmbedding.birkhoffSet
@[simp] lemma birkhoffSet_sup (a b : α) :
    birkhoffSet α (a ⊔ b) = birkhoffSet α a ∪ birkhoffSet α b := by
  unfold OrderEmbedding.birkhoffSet; 

Proof state:
α : Type u_1
inst✝² : DistribLattice α
inst✝¹ : Fintype α
inst✝ : DecidablePred SupIrred
a b : α
⊢ (if h : IsEmpty α then ofIsEmpty
      else
        let_fun this := Fintype.toOrderBot α;
        RelEmbedding.trans (OrderIso.toOrderEmbedding OrderIso.lowerSetSupIrred)
          { toEmbedding := { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) },
            map_rel_iff' :=
              (_ :
                ∀ {a b : LowerSet { a // SupIrred a }},
                  { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } a ≤
                      { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } b ↔
                    { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } a ≤
                      { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } b) })
      (a ⊔ b) =
    (if h : IsEmpty α then ofIsEmpty
        else
          let_fun this := Fintype.toOrderBot α;
          RelEmbedding.trans (OrderIso.toOrderEmbedding OrderIso.lowerSetSupIrred)
            { toEmbedding := { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) },
              map_rel_iff' :=
                (_ :
                  ∀ {a b : LowerSet { a // SupIrred a }},
                    { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } a ≤
                        { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } b ↔
                      { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } a ≤
                        { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } b) })
        a ∪
      (if h : IsEmpty α then ofIsEmpty
        else
          let_fun this := Fintype.toOrderBot α;
          RelEmbedding.trans (OrderIso.toOrderEmbedding OrderIso.lowerSetSupIrred)
            { toEmbedding := { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) },
              map_rel_iff' :=
                (_ :
                  ∀ {a b : LowerSet { a // SupIrred a }},
                    { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } a ≤
                        { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } b ↔
                      { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } a ≤
                        { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } b) })
        b

Next tactic:
split
@[simp] lemma birkhoffSet_sup (a b : α) :
    birkhoffSet α (a ⊔ b) = birkhoffSet α a ∪ birkhoffSet α b := by
  unfold OrderEmbedding.birkhoffSet; split <;> 

Proof state:
case inl
α : Type u_1
inst✝² : DistribLattice α
inst✝¹ : Fintype α
inst✝ : DecidablePred SupIrred
a b : α
h✝ : IsEmpty α
⊢ ofIsEmpty (a ⊔ b) = ofIsEmpty a ∪ ofIsEmpty b

Next tactic:
simp [eq_iff_true_of_subsingleton]
@[simp] lemma birkhoffSet_sup (a b : α) :
    birkhoffSet α (a ⊔ b) = birkhoffSet α a ∪ birkhoffSet α b := by
  unfold OrderEmbedding.birkhoffSet; split <;> 

Proof state:
case inr
α : Type u_1
inst✝² : DistribLattice α
inst✝¹ : Fintype α
inst✝ : DecidablePred SupIrred
a b : α
h✝ : ¬IsEmpty α
⊢ (let_fun this := Fintype.toOrderBot α;
      RelEmbedding.trans (OrderIso.toOrderEmbedding OrderIso.lowerSetSupIrred)
        { toEmbedding := { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) },
          map_rel_iff' :=
            (_ :
              ∀ {a b : LowerSet { a // SupIrred a }},
                { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } a ≤
                    { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } b ↔
                  { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } a ≤
                    { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } b) })
      (a ⊔ b) =
    (let_fun this := Fintype.toOrderBot α;
        RelEmbedding.trans (OrderIso.toOrderEmbedding OrderIso.lowerSetSupIrred)
          { toEmbedding := { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) },
            map_rel_iff' :=
              (_ :
                ∀ {a b : LowerSet { a // SupIrred a }},
                  { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } a ≤
                      { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } b ↔
                    { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } a ≤
                      { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } b) })
        a ∪
      (let_fun this := Fintype.toOrderBot α;
        RelEmbedding.trans (OrderIso.toOrderEmbedding OrderIso.lowerSetSupIrred)
          { toEmbedding := { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) },
            map_rel_iff' :=
              (_ :
                ∀ {a b : LowerSet { a // SupIrred a }},
                  { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } a ≤
                      { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } b ↔
                    { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } a ≤
                      { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } b) })
        b

Next tactic:
simp [eq_iff_true_of_subsingleton]
@[simp] lemma birkhoffSet_inf (a b : α) :
    birkhoffSet α (a ⊓ b) = birkhoffSet α a ∩ birkhoffSet α b := by
  

Proof state:
α : Type u_1
inst✝² : DistribLattice α
inst✝¹ : Fintype α
inst✝ : DecidablePred SupIrred
a b : α
⊢ (birkhoffSet α) (a ⊓ b) = (birkhoffSet α) a ∩ (birkhoffSet α) b

Next tactic:
unfold OrderEmbedding.birkhoffSet
@[simp] lemma birkhoffSet_inf (a b : α) :
    birkhoffSet α (a ⊓ b) = birkhoffSet α a ∩ birkhoffSet α b := by
  unfold OrderEmbedding.birkhoffSet; 

Proof state:
α : Type u_1
inst✝² : DistribLattice α
inst✝¹ : Fintype α
inst✝ : DecidablePred SupIrred
a b : α
⊢ (if h : IsEmpty α then ofIsEmpty
      else
        let_fun this := Fintype.toOrderBot α;
        RelEmbedding.trans (OrderIso.toOrderEmbedding OrderIso.lowerSetSupIrred)
          { toEmbedding := { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) },
            map_rel_iff' :=
              (_ :
                ∀ {a b : LowerSet { a // SupIrred a }},
                  { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } a ≤
                      { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } b ↔
                    { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } a ≤
                      { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } b) })
      (a ⊓ b) =
    (if h : IsEmpty α then ofIsEmpty
        else
          let_fun this := Fintype.toOrderBot α;
          RelEmbedding.trans (OrderIso.toOrderEmbedding OrderIso.lowerSetSupIrred)
            { toEmbedding := { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) },
              map_rel_iff' :=
                (_ :
                  ∀ {a b : LowerSet { a // SupIrred a }},
                    { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } a ≤
                        { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } b ↔
                      { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } a ≤
                        { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } b) })
        a ∩
      (if h : IsEmpty α then ofIsEmpty
        else
          let_fun this := Fintype.toOrderBot α;
          RelEmbedding.trans (OrderIso.toOrderEmbedding OrderIso.lowerSetSupIrred)
            { toEmbedding := { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) },
              map_rel_iff' :=
                (_ :
                  ∀ {a b : LowerSet { a // SupIrred a }},
                    { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } a ≤
                        { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } b ↔
                      { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } a ≤
                        { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } b) })
        b

Next tactic:
split
@[simp] lemma birkhoffSet_inf (a b : α) :
    birkhoffSet α (a ⊓ b) = birkhoffSet α a ∩ birkhoffSet α b := by
  unfold OrderEmbedding.birkhoffSet; split <;> 

Proof state:
case inl
α : Type u_1
inst✝² : DistribLattice α
inst✝¹ : Fintype α
inst✝ : DecidablePred SupIrred
a b : α
h✝ : IsEmpty α
⊢ ofIsEmpty (a ⊓ b) = ofIsEmpty a ∩ ofIsEmpty b

Next tactic:
simp [eq_iff_true_of_subsingleton]
@[simp] lemma birkhoffSet_inf (a b : α) :
    birkhoffSet α (a ⊓ b) = birkhoffSet α a ∩ birkhoffSet α b := by
  unfold OrderEmbedding.birkhoffSet; split <;> 

Proof state:
case inr
α : Type u_1
inst✝² : DistribLattice α
inst✝¹ : Fintype α
inst✝ : DecidablePred SupIrred
a b : α
h✝ : ¬IsEmpty α
⊢ (let_fun this := Fintype.toOrderBot α;
      RelEmbedding.trans (OrderIso.toOrderEmbedding OrderIso.lowerSetSupIrred)
        { toEmbedding := { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) },
          map_rel_iff' :=
            (_ :
              ∀ {a b : LowerSet { a // SupIrred a }},
                { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } a ≤
                    { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } b ↔
                  { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } a ≤
                    { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } b) })
      (a ⊓ b) =
    (let_fun this := Fintype.toOrderBot α;
        RelEmbedding.trans (OrderIso.toOrderEmbedding OrderIso.lowerSetSupIrred)
          { toEmbedding := { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) },
            map_rel_iff' :=
              (_ :
                ∀ {a b : LowerSet { a // SupIrred a }},
                  { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } a ≤
                      { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } b ↔
                    { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } a ≤
                      { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } b) })
        a ∩
      (let_fun this := Fintype.toOrderBot α;
        RelEmbedding.trans (OrderIso.toOrderEmbedding OrderIso.lowerSetSupIrred)
          { toEmbedding := { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) },
            map_rel_iff' :=
              (_ :
                ∀ {a b : LowerSet { a // SupIrred a }},
                  { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } a ≤
                      { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } b ↔
                    { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } a ≤
                      { toFun := SetLike.coe, inj' := (_ : Injective SetLike.coe) } b) })
        b

Next tactic:
simp [eq_iff_true_of_subsingleton]
@[simp] lemma birkhoffFinset_sup (a b : α) :
    birkhoffFinset α (a ⊔ b) = birkhoffFinset α a ∪ birkhoffFinset α b := by
  

Proof state:
α : Type u_1
inst✝³ : DistribLattice α
inst✝² : Fintype α
inst✝¹ : DecidablePred SupIrred
inst✝ : DecidableEq α
a b : α
⊢ (birkhoffFinset α) (a ⊔ b) = (birkhoffFinset α) a ∪ (birkhoffFinset α) b

Next tactic:
dsimp [OrderEmbedding.birkhoffFinset]