l3lab/ntp-mathlib huggingface dataset:
instance Pi.completeAtomicBooleanAlgebra {ι : Type*} {π : ι → Type*}
    [∀ i, CompleteAtomicBooleanAlgebra (π i)] : CompleteAtomicBooleanAlgebra (∀ i, π i) where
  __ := Pi.completeBooleanAlgebra
  iInf_iSup_eq f := by ext; 

Proof state:
case h
α : Type u
β : Type v
ι✝¹ : Sort w
κ : ι✝¹ → Sort w'
ι : Type u_1
π : ι → Type u_2
inst✝ : (i : ι) → CompleteAtomicBooleanAlgebra (π i)
src✝ : CompleteBooleanAlgebra ((i : ι) → π i) := completeBooleanAlgebra
ι✝ : Type (max u_1 u_2)
κ✝ : ι✝ → Type (max u_1 u_2)
f : (a : ι✝) → κ✝ a → (i : ι) → π i
x✝ : ι
⊢ iInf (fun a => ⨆ b, f a b) x✝ = iSup (fun g => ⨅ a, f a (g a)) x✝

Next tactic:
rw [iInf_iSup_eq]
instance Prop.completeAtomicBooleanAlgebra : CompleteAtomicBooleanAlgebra Prop where
  __ := Prop.completeLattice
  __ := Prop.booleanAlgebra
  iInf_iSup_eq f := by 

Proof state:
α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
src✝¹ : CompleteLattice Prop := completeLattice
src✝ : BooleanAlgebra Prop := booleanAlgebra
ι✝ : Type
κ✝ : ι✝ → Type
f : (a : ι✝) → κ✝ a → Prop
⊢ ⨅ a, ⨆ b, f a b = ⨆ g, ⨅ a, f a (g a)

Next tactic:
simp [Classical.skolem]
/-- Pullback an `Order.Frame` along an injection. -/
@[reducible]
protected def Function.Injective.frame [Sup α] [Inf α] [SupSet α] [InfSet α] [Top α] [Bot α]
    [Frame β] (f : α → β) (hf : Injective f) (map_sup : ∀ a b, f (a ⊔ b) = f a ⊔ f b)
    (map_inf : ∀ a b, f (a ⊓ b) = f a ⊓ f b) (map_sSup : ∀ s, f (sSup s) = ⨆ a ∈ s, f a)
    (map_sInf : ∀ s, f (sInf s) = ⨅ a ∈ s, f a) (map_top : f ⊤ = ⊤) (map_bot : f ⊥ = ⊥) :
    Frame α :=
  { hf.completeLattice f map_sup map_inf map_sSup map_sInf map_top map_bot with
    inf_sSup_le_iSup_inf := fun a s => by
      

Proof state:
α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝⁶ : Sup α
inst✝⁵ : Inf α
inst✝⁴ : SupSet α
inst✝³ : InfSet α
inst✝² : Top α
inst✝¹ : Bot α
inst✝ : Frame β
f : α → β
hf : Injective f
map_sup : ∀ (a b : α), f (a ⊔ b) = f a ⊔ f b
map_inf : ∀ (a b : α), f (a ⊓ b) = f a ⊓ f b
map_sSup : ∀ (s : Set α), f (sSup s) = ⨆ a ∈ s, f a
map_sInf : ∀ (s : Set α), f (sInf s) = ⨅ a ∈ s, f a
map_top : f ⊤ = ⊤
map_bot : f ⊥ = ⊥
src✝ : CompleteLattice α := Injective.completeLattice f hf map_sup map_inf map_sSup map_sInf map_top map_bot
a : α
s : Set α
⊢ a ⊓ sSup s ≤ ⨆ b ∈ s, a ⊓ b

Next tactic:
change f (a ⊓ sSup s) ≤ f _
/-- Pullback an `Order.Frame` along an injection. -/
@[reducible]
protected def Function.Injective.frame [Sup α] [Inf α] [SupSet α] [InfSet α] [Top α] [Bot α]
    [Frame β] (f : α → β) (hf : Injective f) (map_sup : ∀ a b, f (a ⊔ b) = f a ⊔ f b)
    (map_inf : ∀ a b, f (a ⊓ b) = f a ⊓ f b) (map_sSup : ∀ s, f (sSup s) = ⨆ a ∈ s, f a)
    (map_sInf : ∀ s, f (sInf s) = ⨅ a ∈ s, f a) (map_top : f ⊤ = ⊤) (map_bot : f ⊥ = ⊥) :
    Frame α :=
  { hf.completeLattice f map_sup map_inf map_sSup map_sInf map_top map_bot with
    inf_sSup_le_iSup_inf := fun a s => by
      change f (a ⊓ sSup s) ≤ f _
      

Proof state:
α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝⁶ : Sup α
inst✝⁵ : Inf α
inst✝⁴ : SupSet α
inst✝³ : InfSet α
inst✝² : Top α
inst✝¹ : Bot α
inst✝ : Frame β
f : α → β
hf : Injective f
map_sup : ∀ (a b : α), f (a ⊔ b) = f a ⊔ f b
map_inf : ∀ (a b : α), f (a ⊓ b) = f a ⊓ f b
map_sSup : ∀ (s : Set α), f (sSup s) = ⨆ a ∈ s, f a
map_sInf : ∀ (s : Set α), f (sInf s) = ⨅ a ∈ s, f a
map_top : f ⊤ = ⊤
map_bot : f ⊥ = ⊥
src✝ : CompleteLattice α := Injective.completeLattice f hf map_sup map_inf map_sSup map_sInf map_top map_bot
a : α
s : Set α
⊢ f (a ⊓ sSup s) ≤ f (⨆ b ∈ s, a ⊓ b)

Next tactic:
rw [← sSup_image, map_inf, map_sSup s, inf_iSup₂_eq]
/-- Pullback an `Order.Frame` along an injection. -/
@[reducible]
protected def Function.Injective.frame [Sup α] [Inf α] [SupSet α] [InfSet α] [Top α] [Bot α]
    [Frame β] (f : α → β) (hf : Injective f) (map_sup : ∀ a b, f (a ⊔ b) = f a ⊔ f b)
    (map_inf : ∀ a b, f (a ⊓ b) = f a ⊓ f b) (map_sSup : ∀ s, f (sSup s) = ⨆ a ∈ s, f a)
    (map_sInf : ∀ s, f (sInf s) = ⨅ a ∈ s, f a) (map_top : f ⊤ = ⊤) (map_bot : f ⊥ = ⊥) :
    Frame α :=
  { hf.completeLattice f map_sup map_inf map_sSup map_sInf map_top map_bot with
    inf_sSup_le_iSup_inf := fun a s => by
      change f (a ⊓ sSup s) ≤ f _
      rw [← sSup_image, map_inf, map_sSup s, inf_iSup₂_eq]
      

Proof state:
α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝⁶ : Sup α
inst✝⁵ : Inf α
inst✝⁴ : SupSet α
inst✝³ : InfSet α
inst✝² : Top α
inst✝¹ : Bot α
inst✝ : Frame β
f : α → β
hf : Injective f
map_sup : ∀ (a b : α), f (a ⊔ b) = f a ⊔ f b
map_inf : ∀ (a b : α), f (a ⊓ b) = f a ⊓ f b
map_sSup : ∀ (s : Set α), f (sSup s) = ⨆ a ∈ s, f a
map_sInf : ∀ (s : Set α), f (sInf s) = ⨅ a ∈ s, f a
map_top : f ⊤ = ⊤
map_bot : f ⊥ = ⊥
src✝ : CompleteLattice α := Injective.completeLattice f hf map_sup map_inf map_sSup map_sInf map_top map_bot
a : α
s : Set α
⊢ ⨆ i ∈ s, f a ⊓ f i ≤ f (sSup ((fun b => a ⊓ b) '' s))

Next tactic:
simp_rw [← map_inf]
/-- Pullback an `Order.Frame` along an injection. -/
@[reducible]
protected def Function.Injective.frame [Sup α] [Inf α] [SupSet α] [InfSet α] [Top α] [Bot α]
    [Frame β] (f : α → β) (hf : Injective f) (map_sup : ∀ a b, f (a ⊔ b) = f a ⊔ f b)
    (map_inf : ∀ a b, f (a ⊓ b) = f a ⊓ f b) (map_sSup : ∀ s, f (sSup s) = ⨆ a ∈ s, f a)
    (map_sInf : ∀ s, f (sInf s) = ⨅ a ∈ s, f a) (map_top : f ⊤ = ⊤) (map_bot : f ⊥ = ⊥) :
    Frame α :=
  { hf.completeLattice f map_sup map_inf map_sSup map_sInf map_top map_bot with
    inf_sSup_le_iSup_inf := fun a s => by
      change f (a ⊓ sSup s) ≤ f _
      rw [← sSup_image, map_inf, map_sSup s, inf_iSup₂_eq]
      simp_rw [← map_inf]
      

Proof state:
α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝⁶ : Sup α
inst✝⁵ : Inf α
inst✝⁴ : SupSet α
inst✝³ : InfSet α
inst✝² : Top α
inst✝¹ : Bot α
inst✝ : Frame β
f : α → β
hf : Injective f
map_sup : ∀ (a b : α), f (a ⊔ b) = f a ⊔ f b
map_inf : ∀ (a b : α), f (a ⊓ b) = f a ⊓ f b
map_sSup : ∀ (s : Set α), f (sSup s) = ⨆ a ∈ s, f a
map_sInf : ∀ (s : Set α), f (sInf s) = ⨅ a ∈ s, f a
map_top : f ⊤ = ⊤
map_bot : f ⊥ = ⊥
src✝ : CompleteLattice α := Injective.completeLattice f hf map_sup map_inf map_sSup map_sInf map_top map_bot
a : α
s : Set α
⊢ ⨆ i ∈ s, f (a ⊓ i) ≤ f (sSup ((fun a_1 => a ⊓ a_1) '' s))

Next tactic:
exact ((map_sSup _).trans iSup_image).ge
/-- Pullback an `Order.Coframe` along an injection. -/
@[reducible]
protected def Function.Injective.coframe [Sup α] [Inf α] [SupSet α] [InfSet α] [Top α] [Bot α]
    [Coframe β] (f : α → β) (hf : Injective f) (map_sup : ∀ a b, f (a ⊔ b) = f a ⊔ f b)
    (map_inf : ∀ a b, f (a ⊓ b) = f a ⊓ f b) (map_sSup : ∀ s, f (sSup s) = ⨆ a ∈ s, f a)
    (map_sInf : ∀ s, f (sInf s) = ⨅ a ∈ s, f a) (map_top : f ⊤ = ⊤) (map_bot : f ⊥ = ⊥) :
    Coframe α :=
  { hf.completeLattice f map_sup map_inf map_sSup map_sInf map_top map_bot with
    iInf_sup_le_sup_sInf := fun a s => by
      

Proof state:
α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝⁶ : Sup α
inst✝⁵ : Inf α
inst✝⁴ : SupSet α
inst✝³ : InfSet α
inst✝² : Top α
inst✝¹ : Bot α
inst✝ : Coframe β
f : α → β
hf : Injective f
map_sup : ∀ (a b : α), f (a ⊔ b) = f a ⊔ f b
map_inf : ∀ (a b : α), f (a ⊓ b) = f a ⊓ f b
map_sSup : ∀ (s : Set α), f (sSup s) = ⨆ a ∈ s, f a
map_sInf : ∀ (s : Set α), f (sInf s) = ⨅ a ∈ s, f a
map_top : f ⊤ = ⊤
map_bot : f ⊥ = ⊥
src✝ : CompleteLattice α := Injective.completeLattice f hf map_sup map_inf map_sSup map_sInf map_top map_bot
a : α
s : Set α
⊢ ⨅ b ∈ s, a ⊔ b ≤ a ⊔ sInf s

Next tactic:
change f _ ≤ f (a ⊔ sInf s)
/-- Pullback an `Order.Coframe` along an injection. -/
@[reducible]
protected def Function.Injective.coframe [Sup α] [Inf α] [SupSet α] [InfSet α] [Top α] [Bot α]
    [Coframe β] (f : α → β) (hf : Injective f) (map_sup : ∀ a b, f (a ⊔ b) = f a ⊔ f b)
    (map_inf : ∀ a b, f (a ⊓ b) = f a ⊓ f b) (map_sSup : ∀ s, f (sSup s) = ⨆ a ∈ s, f a)
    (map_sInf : ∀ s, f (sInf s) = ⨅ a ∈ s, f a) (map_top : f ⊤ = ⊤) (map_bot : f ⊥ = ⊥) :
    Coframe α :=
  { hf.completeLattice f map_sup map_inf map_sSup map_sInf map_top map_bot with
    iInf_sup_le_sup_sInf := fun a s => by
      change f _ ≤ f (a ⊔ sInf s)
      

Proof state:
α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝⁶ : Sup α
inst✝⁵ : Inf α
inst✝⁴ : SupSet α
inst✝³ : InfSet α
inst✝² : Top α
inst✝¹ : Bot α
inst✝ : Coframe β
f : α → β
hf : Injective f
map_sup : ∀ (a b : α), f (a ⊔ b) = f a ⊔ f b
map_inf : ∀ (a b : α), f (a ⊓ b) = f a ⊓ f b
map_sSup : ∀ (s : Set α), f (sSup s) = ⨆ a ∈ s, f a
map_sInf : ∀ (s : Set α), f (sInf s) = ⨅ a ∈ s, f a
map_top : f ⊤ = ⊤
map_bot : f ⊥ = ⊥
src✝ : CompleteLattice α := Injective.completeLattice f hf map_sup map_inf map_sSup map_sInf map_top map_bot
a : α
s : Set α
⊢ f (⨅ b ∈ s, a ⊔ b) ≤ f (a ⊔ sInf s)

Next tactic:
rw [← sInf_image, map_sup, map_sInf s, sup_iInf₂_eq]
/-- Pullback an `Order.Coframe` along an injection. -/
@[reducible]
protected def Function.Injective.coframe [Sup α] [Inf α] [SupSet α] [InfSet α] [Top α] [Bot α]
    [Coframe β] (f : α → β) (hf : Injective f) (map_sup : ∀ a b, f (a ⊔ b) = f a ⊔ f b)
    (map_inf : ∀ a b, f (a ⊓ b) = f a ⊓ f b) (map_sSup : ∀ s, f (sSup s) = ⨆ a ∈ s, f a)
    (map_sInf : ∀ s, f (sInf s) = ⨅ a ∈ s, f a) (map_top : f ⊤ = ⊤) (map_bot : f ⊥ = ⊥) :
    Coframe α :=
  { hf.completeLattice f map_sup map_inf map_sSup map_sInf map_top map_bot with
    iInf_sup_le_sup_sInf := fun a s => by
      change f _ ≤ f (a ⊔ sInf s)
      rw [← sInf_image, map_sup, map_sInf s, sup_iInf₂_eq]
      

Proof state:
α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝⁶ : Sup α
inst✝⁵ : Inf α
inst✝⁴ : SupSet α
inst✝³ : InfSet α
inst✝² : Top α
inst✝¹ : Bot α
inst✝ : Coframe β
f : α → β
hf : Injective f
map_sup : ∀ (a b : α), f (a ⊔ b) = f a ⊔ f b
map_inf : ∀ (a b : α), f (a ⊓ b) = f a ⊓ f b
map_sSup : ∀ (s : Set α), f (sSup s) = ⨆ a ∈ s, f a
map_sInf : ∀ (s : Set α), f (sInf s) = ⨅ a ∈ s, f a
map_top : f ⊤ = ⊤
map_bot : f ⊥ = ⊥
src✝ : CompleteLattice α := Injective.completeLattice f hf map_sup map_inf map_sSup map_sInf map_top map_bot
a : α
s : Set α
⊢ f (sInf ((fun b => a ⊔ b) '' s)) ≤ ⨅ i ∈ s, f a ⊔ f i

Next tactic:
simp_rw [← map_sup]
/-- Pullback an `Order.Coframe` along an injection. -/
@[reducible]
protected def Function.Injective.coframe [Sup α] [Inf α] [SupSet α] [InfSet α] [Top α] [Bot α]
    [Coframe β] (f : α → β) (hf : Injective f) (map_sup : ∀ a b, f (a ⊔ b) = f a ⊔ f b)
    (map_inf : ∀ a b, f (a ⊓ b) = f a ⊓ f b) (map_sSup : ∀ s, f (sSup s) = ⨆ a ∈ s, f a)
    (map_sInf : ∀ s, f (sInf s) = ⨅ a ∈ s, f a) (map_top : f ⊤ = ⊤) (map_bot : f ⊥ = ⊥) :
    Coframe α :=
  { hf.completeLattice f map_sup map_inf map_sSup map_sInf map_top map_bot with
    iInf_sup_le_sup_sInf := fun a s => by
      change f _ ≤ f (a ⊔ sInf s)
      rw [← sInf_image, map_sup, map_sInf s, sup_iInf₂_eq]
      simp_rw [← map_sup]
      

Proof state:
α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝⁶ : Sup α
inst✝⁵ : Inf α
inst✝⁴ : SupSet α
inst✝³ : InfSet α
inst✝² : Top α
inst✝¹ : Bot α
inst✝ : Coframe β
f : α → β
hf : Injective f
map_sup : ∀ (a b : α), f (a ⊔ b) = f a ⊔ f b
map_inf : ∀ (a b : α), f (a ⊓ b) = f a ⊓ f b
map_sSup : ∀ (s : Set α), f (sSup s) = ⨆ a ∈ s, f a
map_sInf : ∀ (s : Set α), f (sInf s) = ⨅ a ∈ s, f a
map_top : f ⊤ = ⊤
map_bot : f ⊥ = ⊥
src✝ : CompleteLattice α := Injective.completeLattice f hf map_sup map_inf map_sSup map_sInf map_top map_bot
a : α
s : Set α
⊢ f (sInf ((fun a_1 => a ⊔ a_1) '' s)) ≤ ⨅ i ∈ s, f (a ⊔ i)

Next tactic:
exact ((map_sInf _).trans iInf_image).le
/-- Pullback a `CompletelyDistribLattice` along an injection. -/
@[reducible]
protected def Function.Injective.completelyDistribLattice [Sup α] [Inf α] [SupSet α] [InfSet α]
    [Top α] [Bot α] [CompletelyDistribLattice β] (f : α → β) (hf : Function.Injective f)
    (map_sup : ∀ a b, f (a ⊔ b) = f a ⊔ f b) (map_inf : ∀ a b, f (a ⊓ b) = f a ⊓ f b)
    (map_sSup : ∀ s, f (sSup s) = ⨆ a ∈ s, f a) (map_sInf : ∀ s, f (sInf s) = ⨅ a ∈ s, f a)
    (map_top : f ⊤ = ⊤) (map_bot : f ⊥ = ⊥) : CompletelyDistribLattice α where
  __ := hf.completeLattice f map_sup map_inf map_sSup map_sInf map_top map_bot
  iInf_iSup_eq g := hf <| by
    

Proof state:
α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝⁶ : Sup α
inst✝⁵ : Inf α
inst✝⁴ : SupSet α
inst✝³ : InfSet α
inst✝² : Top α
inst✝¹ : Bot α
inst✝ : CompletelyDistribLattice β
f : α → β
hf : Injective f
map_sup : ∀ (a b : α), f (a ⊔ b) = f a ⊔ f b
map_inf : ∀ (a b : α), f (a ⊓ b) = f a ⊓ f b
map_sSup : ∀ (s : Set α), f (sSup s) = ⨆ a ∈ s, f a
map_sInf : ∀ (s : Set α), f (sInf s) = ⨅ a ∈ s, f a
map_top : f ⊤ = ⊤
map_bot : f ⊥ = ⊥
src✝ : CompleteLattice α := Injective.completeLattice f hf map_sup map_inf map_sSup map_sInf map_top map_bot
ι✝ : Type u
κ✝ : ι✝ → Type u
g : (a : ι✝) → κ✝ a → α
⊢ f (⨅ a, ⨆ b, g a b) = f (⨆ g_1, ⨅ a, g a (g_1 a))

Next tactic:
simp_rw [iInf, map_sInf, iInf_range, iSup, map_sSup, iSup_range, map_sInf, iInf_range,
      iInf_iSup_eq]
instance completeAtomicBooleanAlgebra : CompleteAtomicBooleanAlgebra PUnit := by
  

Proof state:
α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
s : Set PUnit.{u + 1}
x y : PUnit.{u + 1}
⊢ CompleteAtomicBooleanAlgebra PUnit.{?u.170905 + 1}

Next tactic:
refine'
    { PUnit.booleanAlgebra with
      sSup := fun _ => unit
      sInf := fun _ => unit
      .. }
instance completeAtomicBooleanAlgebra : CompleteAtomicBooleanAlgebra PUnit := by
  refine'
    { PUnit.booleanAlgebra with
      sSup := fun _ => unit
      sInf := fun _ => unit
      .. } <;>
  (

Proof state:
case refine'_1
α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
s : Set PUnit.{u + 1}
x y : PUnit.{u + 1}
src✝ : BooleanAlgebra PUnit.{?u.170911 + 1} := booleanAlgebra
⊢ ∀ (s : Set PUnit.{?u.170911 + 1}), ∀ a ∈ s, a ≤ sSup s

Next tactic:
intros
instance completeAtomicBooleanAlgebra : CompleteAtomicBooleanAlgebra PUnit := by
  refine'
    { PUnit.booleanAlgebra with
      sSup := fun _ => unit
      sInf := fun _ => unit
      .. } <;>
  (intros; 

Proof state:
case refine'_1
α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
s : Set PUnit.{u + 1}
x y : PUnit.{u + 1}
src✝ : BooleanAlgebra PUnit.{?u.170911 + 1} := booleanAlgebra
s✝ : Set PUnit.{?u.170911 + 1}
a✝¹ : PUnit.{?u.170911 + 1}
a✝ : a✝¹ ∈ s✝
⊢ a✝¹ ≤ sSup s✝

Next tactic:
trivial
instance completeAtomicBooleanAlgebra : CompleteAtomicBooleanAlgebra PUnit := by
  refine'
    { PUnit.booleanAlgebra with
      sSup := fun _ => unit
      sInf := fun _ => unit
      .. } <;>
  (

Proof state:
case refine'_2
α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
s : Set PUnit.{u + 1}
x y : PUnit.{u + 1}
src✝ : BooleanAlgebra PUnit.{?u.170911 + 1} := booleanAlgebra
⊢ ∀ (s : Set PUnit.{?u.170911 + 1}) (a : PUnit.{?u.170911 + 1}), (∀ b ∈ s, b ≤ a) → sSup s ≤ a

Next tactic:
intros
instance completeAtomicBooleanAlgebra : CompleteAtomicBooleanAlgebra PUnit := by
  refine'
    { PUnit.booleanAlgebra with
      sSup := fun _ => unit
      sInf := fun _ => unit
      .. } <;>
  (intros; 

Proof state:
case refine'_2
α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
s : Set PUnit.{u + 1}
x y : PUnit.{u + 1}
src✝ : BooleanAlgebra PUnit.{?u.170911 + 1} := booleanAlgebra
s✝ : Set PUnit.{?u.170911 + 1}
a✝¹ : PUnit.{?u.170911 + 1}
a✝ : ∀ b ∈ s✝, b ≤ a✝¹
⊢ sSup s✝ ≤ a✝¹

Next tactic:
trivial
instance completeAtomicBooleanAlgebra : CompleteAtomicBooleanAlgebra PUnit := by
  refine'
    { PUnit.booleanAlgebra with
      sSup := fun _ => unit
      sInf := fun _ => unit
      .. } <;>
  (

Proof state:
case refine'_3
α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
s : Set PUnit.{u + 1}
x y : PUnit.{u + 1}
src✝ : BooleanAlgebra PUnit.{?u.170911 + 1} := booleanAlgebra
⊢ ∀ (s : Set PUnit.{?u.170911 + 1}), ∀ a ∈ s, sInf s ≤ a

Next tactic:
intros
instance completeAtomicBooleanAlgebra : CompleteAtomicBooleanAlgebra PUnit := by
  refine'
    { PUnit.booleanAlgebra with
      sSup := fun _ => unit
      sInf := fun _ => unit
      .. } <;>
  (intros; 

Proof state:
case refine'_3
α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
s : Set PUnit.{u + 1}
x y : PUnit.{u + 1}
src✝ : BooleanAlgebra PUnit.{?u.170911 + 1} := booleanAlgebra
s✝ : Set PUnit.{?u.170911 + 1}
a✝¹ : PUnit.{?u.170911 + 1}
a✝ : a✝¹ ∈ s✝
⊢ sInf s✝ ≤ a✝¹

Next tactic:
trivial
instance completeAtomicBooleanAlgebra : CompleteAtomicBooleanAlgebra PUnit := by
  refine'
    { PUnit.booleanAlgebra with
      sSup := fun _ => unit
      sInf := fun _ => unit
      .. } <;>
  (

Proof state:
case refine'_4
α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
s : Set PUnit.{u + 1}
x y : PUnit.{u + 1}
src✝ : BooleanAlgebra PUnit.{?u.170911 + 1} := booleanAlgebra
⊢ ∀ (s : Set PUnit.{?u.170911 + 1}) (a : PUnit.{?u.170911 + 1}), (∀ b ∈ s, a ≤ b) → a ≤ sInf s

Next tactic:
intros
instance completeAtomicBooleanAlgebra : CompleteAtomicBooleanAlgebra PUnit := by
  refine'
    { PUnit.booleanAlgebra with
      sSup := fun _ => unit
      sInf := fun _ => unit
      .. } <;>
  (intros; 

Proof state:
case refine'_4
α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
s : Set PUnit.{u + 1}
x y : PUnit.{u + 1}
src✝ : BooleanAlgebra PUnit.{?u.170911 + 1} := booleanAlgebra
s✝ : Set PUnit.{?u.170911 + 1}
a✝¹ : PUnit.{?u.170911 + 1}
a✝ : ∀ b ∈ s✝, a✝¹ ≤ b
⊢ a✝¹ ≤ sInf s✝

Next tactic:
trivial
instance completeAtomicBooleanAlgebra : CompleteAtomicBooleanAlgebra PUnit := by
  refine'
    { PUnit.booleanAlgebra with
      sSup := fun _ => unit
      sInf := fun _ => unit
      .. } <;>
  (

Proof state:
case refine'_5
α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
s : Set PUnit.{u + 1}
x y : PUnit.{u + 1}
src✝ : BooleanAlgebra PUnit.{?u.170911 + 1} := booleanAlgebra
⊢ ∀ {ι : Type ?u.170911} {κ : ι → Type ?u.170911} (f : (a : ι) → κ a → PUnit.{?u.170911 + 1}),
    ⨅ a, ⨆ b, f a b = ⨆ g, ⨅ a, f a (g a)

Next tactic:
intros
instance completeAtomicBooleanAlgebra : CompleteAtomicBooleanAlgebra PUnit := by
  refine'
    { PUnit.booleanAlgebra with
      sSup := fun _ => unit
      sInf := fun _ => unit
      .. } <;>
  (intros; 

Proof state:
case refine'_5
α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
s : Set PUnit.{u + 1}
x y : PUnit.{u + 1}
src✝ : BooleanAlgebra PUnit.{?u.170911 + 1} := booleanAlgebra
ι✝ : Type ?u.170911
κ✝ : ι✝ → Type ?u.170911
f✝ : (a : ι✝) → κ✝ a → PUnit.{?u.170911 + 1}
⊢ ⨅ a, ⨆ b, f✝ a b = ⨆ g, ⨅ a, f✝ a (g a)

Next tactic:
trivial
instance completeAtomicBooleanAlgebra : CompleteAtomicBooleanAlgebra PUnit := by
  refine'
    { PUnit.booleanAlgebra with
      sSup := fun _ => unit
      sInf := fun _ => unit
      .. } <;>
  (

Proof state:
case refine'_6
α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
s : Set PUnit.{u + 1}
x y : PUnit.{u + 1}
src✝ : BooleanAlgebra PUnit.{?u.170911 + 1} := booleanAlgebra
⊢ ∀ (a : PUnit.{?u.170911 + 1}) (s : Set PUnit.{?u.170911 + 1}), a ⊓ sSup s ≤ ⨆ b ∈ s, a ⊓ b

Next tactic:
intros
instance completeAtomicBooleanAlgebra : CompleteAtomicBooleanAlgebra PUnit := by
  refine'
    { PUnit.booleanAlgebra with
      sSup := fun _ => unit
      sInf := fun _ => unit
      .. } <;>
  (intros; 

Proof state:
case refine'_6
α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
s : Set PUnit.{u + 1}
x y : PUnit.{u + 1}
src✝ : BooleanAlgebra PUnit.{?u.170911 + 1} := booleanAlgebra
a✝ : PUnit.{?u.170911 + 1}
s✝ : Set PUnit.{?u.170911 + 1}
⊢ a✝ ⊓ sSup s✝ ≤ ⨆ b ∈ s✝, a✝ ⊓ b

Next tactic:
trivial
instance completeAtomicBooleanAlgebra : CompleteAtomicBooleanAlgebra PUnit := by
  refine'
    { PUnit.booleanAlgebra with
      sSup := fun _ => unit
      sInf := fun _ => unit
      .. } <;>
  (

Proof state:
case refine'_7
α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
s : Set PUnit.{u + 1}
x y : PUnit.{u + 1}
src✝ : BooleanAlgebra PUnit.{?u.170911 + 1} := booleanAlgebra
⊢ ∀ (a : PUnit.{?u.170911 + 1}) (s : Set PUnit.{?u.170911 + 1}), ⨅ b ∈ s, a ⊔ b ≤ a ⊔ sInf s

Next tactic:
intros
instance completeAtomicBooleanAlgebra : CompleteAtomicBooleanAlgebra PUnit := by
  refine'
    { PUnit.booleanAlgebra with
      sSup := fun _ => unit
      sInf := fun _ => unit
      .. } <;>
  (intros; 

Proof state:
case refine'_7
α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
s : Set PUnit.{u + 1}
x y : PUnit.{u + 1}
src✝ : BooleanAlgebra PUnit.{?u.170911 + 1} := booleanAlgebra
a✝ : PUnit.{?u.170911 + 1}
s✝ : Set PUnit.{?u.170911 + 1}
⊢ ⨅ b ∈ s✝, a✝ ⊔ b ≤ a✝ ⊔ sInf s✝

Next tactic:
trivial
theorem tsub_div (a b c : α) : (a - b) / c = a / c - b / c := by 

Proof state:
α : Type u_1
inst✝² : CanonicallyLinearOrderedSemifield α
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c : α
⊢ (a - b) / c = a / c - b / c

Next tactic:
simp_rw [div_eq_mul_inv, tsub_mul]
@[simp]
theorem Orientation.map_refl : (Orientation.map ι <| LinearEquiv.refl R M) = Equiv.refl _ := by
  

Proof state:
R : Type u_1
inst✝⁴ : StrictOrderedCommSemiring R
M : Type u_2
inst✝³ : AddCommMonoid M
inst✝² : Module R M
N : Type u_3
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
ι : Type u_4
ι' : Type u_5
⊢ map ι (LinearEquiv.refl R M) = Equiv.refl (Orientation R M ι)

Next tactic:
rw [Orientation.map, AlternatingMap.domLCongr_refl, Module.Ray.map_refl]
@[simp]
theorem Orientation.reindex_refl : (Orientation.reindex R M <| Equiv.refl ι) = Equiv.refl _ := by
  

Proof state:
R : Type u_1
inst✝⁴ : StrictOrderedCommSemiring R
M : Type u_2
inst✝³ : AddCommMonoid M
inst✝² : Module R M
N : Type u_3
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
ι : Type u_4
ι' : Type u_5
⊢ reindex R M (Equiv.refl ι) = Equiv.refl (Orientation R M ι)

Next tactic:
rw [Orientation.reindex, AlternatingMap.domDomCongrₗ_refl, Module.Ray.map_refl]
/-- A module is canonically oriented with respect to an empty index type. -/
instance (priority := 100) IsEmpty.oriented [IsEmpty ι] : Module.Oriented R M ι where
  positiveOrientation :=
    rayOfNeZero R (AlternatingMap.constLinearEquivOfIsEmpty 1) <|
      AlternatingMap.constLinearEquivOfIsEmpty.injective.ne (by 

Proof state:
R : Type u_1
inst✝⁵ : StrictOrderedCommSemiring R
M : Type u_2
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
N : Type u_3
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
ι : Type u_4
ι' : Type u_5
inst✝ : IsEmpty ι
⊢ 1 ≠ AddMonoid.toZero.1

Next tactic:
exact one_ne_zero
@[simp]
theorem Orientation.map_of_isEmpty [IsEmpty ι] (x : Orientation R M ι) (f : M ≃ₗ[R] M) :
    Orientation.map ι f x = x := by
  

Proof state:
R : Type u_1
inst✝⁵ : StrictOrderedCommSemiring R
M : Type u_2
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
N : Type u_3
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
ι : Type u_4
ι' : Type u_5
inst✝ : IsEmpty ι
x : Orientation R M ι
f : M ≃ₗ[R] M
⊢ (map ι f) x = x

Next tactic:
induction' x using Module.Ray.ind with g hg
@[simp]
theorem Orientation.map_of_isEmpty [IsEmpty ι] (x : Orientation R M ι) (f : M ≃ₗ[R] M) :
    Orientation.map ι f x = x := by
  induction' x using Module.Ray.ind with g hg
  

Proof state:
case h
R : Type u_1
inst✝⁵ : StrictOrderedCommSemiring R
M : Type u_2
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
N : Type u_3
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
ι : Type u_4
ι' : Type u_5
inst✝ : IsEmpty ι
f : M ≃ₗ[R] M
g : M [Λ^ι]→ₗ[R] R
hg : g ≠ 0
⊢ (map ι f) (rayOfNeZero R g hg) = rayOfNeZero R g hg

Next tactic:
rw [Orientation.map_apply]
@[simp]
theorem Orientation.map_of_isEmpty [IsEmpty ι] (x : Orientation R M ι) (f : M ≃ₗ[R] M) :
    Orientation.map ι f x = x := by
  induction' x using Module.Ray.ind with g hg
  rw [Orientation.map_apply]
  

Proof state:
case h
R : Type u_1
inst✝⁵ : StrictOrderedCommSemiring R
M : Type u_2
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
N : Type u_3
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
ι : Type u_4
ι' : Type u_5
inst✝ : IsEmpty ι
f : M ≃ₗ[R] M
g : M [Λ^ι]→ₗ[R] R
hg : g ≠ 0
⊢ rayOfNeZero R (AlternatingMap.compLinearMap g ↑(LinearEquiv.symm f))
      (_ : ¬AlternatingMap.compLinearMap g ↑(LinearEquiv.symm f) = 0) =
    rayOfNeZero R g hg

Next tactic:
congr
@[simp]
theorem Orientation.map_of_isEmpty [IsEmpty ι] (x : Orientation R M ι) (f : M ≃ₗ[R] M) :
    Orientation.map ι f x = x := by
  induction' x using Module.Ray.ind with g hg
  rw [Orientation.map_apply]
  congr
  

Proof state:
case h.e_v
R : Type u_1
inst✝⁵ : StrictOrderedCommSemiring R
M : Type u_2
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
N : Type u_3
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
ι : Type u_4
ι' : Type u_5
inst✝ : IsEmpty ι
f : M ≃ₗ[R] M
g : M [Λ^ι]→ₗ[R] R
hg : g ≠ 0
⊢ AlternatingMap.compLinearMap g ↑(LinearEquiv.symm f) = g

Next tactic:
ext i