l3lab/ntp-mathlib huggingface dataset:
instance isLocalizedModule_toPushforwardStalkAlgHom :
    IsLocalizedModule p.asIdeal.primeCompl (toPushforwardStalkAlgHom R S p).toLinearMap := by
  apply IsLocalizedModule.mkOfAlgebra
  · intro x hx; rw [algebraMap_pushforward_stalk, toPushforwardStalk_comp]
    change IsUnit ((TopCat.Presheaf.stalkFunctor CommRingCat p).map
      (Spec.sheafedSpaceMap (algebraMap ↑R ↑S)).c _)
    exact (IsLocalization.map_units ((structureSheaf R).presheaf.stalk p) ⟨x, hx⟩).map _
  · apply isLocalizedModule_toPushforwardStalkAlgHom_aux
  · intro x hx
    rw [toPushforwardStalkAlgHom_apply, ← (toPushforwardStalk (algebraMap R S) p).map_zero,
      toPushforwardStalk] at hx
    -- Porting note : this `change` is manually rewriting `comp_apply`
    change _ = (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)
      (⟨p, trivial⟩ : (⊤ : TopologicalSpace.Opens (PrimeSpectrum R))) (toOpen S ⊤ 0)) at hx
    rw [map_zero] at hx
    change (forget CommRingCat).map _ _ = (forget _).map _ _ at hx
    obtain ⟨U, hpU, i₁, i₂, e⟩ := TopCat.Presheaf.germ_eq _ _ _ _ _ _ hx
    obtain ⟨_, ⟨r, rfl⟩, hpr, hrU⟩ :=
      PrimeSpectrum.isTopologicalBasis_basic_opens.exists_subset_of_mem_open (show p ∈ U.1 from hpU)
        U.2
    change PrimeSpectrum.basicOpen r ≤ U at hrU
    

Proof state:
case h₃.intro.intro.intro.intro.intro.intro.intro.intro
R S : CommRingCat
f : R ⟶ S
p : PrimeSpectrum ↑R
inst✝ : Algebra ↑R ↑S
x : ↑S
hx :
  (forget CommRingCat).map
      (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)
        { val := p, property := trivial })
      ((toOpen ↑S ⊤) x) =
    (forget CommRingCat).map
      (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)
        { val := p, property := trivial })
      0
U : TopologicalSpace.Opens ↑(Spec.topObj R)
hpU : p ∈ U
i₁ : U ⟶ ⊤
i₂ : U ⟶ ⊤
e :
  ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map i₁.op) ((toOpen ↑S ⊤) x) =
    ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map i₂.op) 0
r : ↑R
hpr : p ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) r
hrU : PrimeSpectrum.basicOpen r ≤ U
⊢ ∃ m, m • x = 0

Next tactic:
apply_fun (Spec.topMap (algebraMap R S) _* (structureSheaf S).1).map (homOfLE hrU).op at e
instance isLocalizedModule_toPushforwardStalkAlgHom :
    IsLocalizedModule p.asIdeal.primeCompl (toPushforwardStalkAlgHom R S p).toLinearMap := by
  apply IsLocalizedModule.mkOfAlgebra
  · intro x hx; rw [algebraMap_pushforward_stalk, toPushforwardStalk_comp]
    change IsUnit ((TopCat.Presheaf.stalkFunctor CommRingCat p).map
      (Spec.sheafedSpaceMap (algebraMap ↑R ↑S)).c _)
    exact (IsLocalization.map_units ((structureSheaf R).presheaf.stalk p) ⟨x, hx⟩).map _
  · apply isLocalizedModule_toPushforwardStalkAlgHom_aux
  · intro x hx
    rw [toPushforwardStalkAlgHom_apply, ← (toPushforwardStalk (algebraMap R S) p).map_zero,
      toPushforwardStalk] at hx
    -- Porting note : this `change` is manually rewriting `comp_apply`
    change _ = (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)
      (⟨p, trivial⟩ : (⊤ : TopologicalSpace.Opens (PrimeSpectrum R))) (toOpen S ⊤ 0)) at hx
    rw [map_zero] at hx
    change (forget CommRingCat).map _ _ = (forget _).map _ _ at hx
    obtain ⟨U, hpU, i₁, i₂, e⟩ := TopCat.Presheaf.germ_eq _ _ _ _ _ _ hx
    obtain ⟨_, ⟨r, rfl⟩, hpr, hrU⟩ :=
      PrimeSpectrum.isTopologicalBasis_basic_opens.exists_subset_of_mem_open (show p ∈ U.1 from hpU)
        U.2
    change PrimeSpectrum.basicOpen r ≤ U at hrU
    apply_fun (Spec.topMap (algebraMap R S) _* (structureSheaf S).1).map (homOfLE hrU).op at e
    

Proof state:
case h₃.intro.intro.intro.intro.intro.intro.intro.intro
R S : CommRingCat
f : R ⟶ S
p : PrimeSpectrum ↑R
inst✝ : Algebra ↑R ↑S
x : ↑S
hx :
  (forget CommRingCat).map
      (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)
        { val := p, property := trivial })
      ((toOpen ↑S ⊤) x) =
    (forget CommRingCat).map
      (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)
        { val := p, property := trivial })
      0
U : TopologicalSpace.Opens ↑(Spec.topObj R)
hpU : p ∈ U
i₁ : U ⟶ ⊤
i₂ : U ⟶ ⊤
r : ↑R
hpr : p ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) r
hrU : PrimeSpectrum.basicOpen r ≤ U
e :
  ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map (homOfLE hrU).op)
      (((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map i₁.op) ((toOpen ↑S ⊤) x)) =
    ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map (homOfLE hrU).op)
      (((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map i₂.op) 0)
⊢ ∃ m, m • x = 0

Next tactic:
simp only [TopCat.Presheaf.pushforwardObj_map, Functor.op_map, map_zero, ← comp_apply,
      toOpen_res] at e
instance isLocalizedModule_toPushforwardStalkAlgHom :
    IsLocalizedModule p.asIdeal.primeCompl (toPushforwardStalkAlgHom R S p).toLinearMap := by
  apply IsLocalizedModule.mkOfAlgebra
  · intro x hx; rw [algebraMap_pushforward_stalk, toPushforwardStalk_comp]
    change IsUnit ((TopCat.Presheaf.stalkFunctor CommRingCat p).map
      (Spec.sheafedSpaceMap (algebraMap ↑R ↑S)).c _)
    exact (IsLocalization.map_units ((structureSheaf R).presheaf.stalk p) ⟨x, hx⟩).map _
  · apply isLocalizedModule_toPushforwardStalkAlgHom_aux
  · intro x hx
    rw [toPushforwardStalkAlgHom_apply, ← (toPushforwardStalk (algebraMap R S) p).map_zero,
      toPushforwardStalk] at hx
    -- Porting note : this `change` is manually rewriting `comp_apply`
    change _ = (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)
      (⟨p, trivial⟩ : (⊤ : TopologicalSpace.Opens (PrimeSpectrum R))) (toOpen S ⊤ 0)) at hx
    rw [map_zero] at hx
    change (forget CommRingCat).map _ _ = (forget _).map _ _ at hx
    obtain ⟨U, hpU, i₁, i₂, e⟩ := TopCat.Presheaf.germ_eq _ _ _ _ _ _ hx
    obtain ⟨_, ⟨r, rfl⟩, hpr, hrU⟩ :=
      PrimeSpectrum.isTopologicalBasis_basic_opens.exists_subset_of_mem_open (show p ∈ U.1 from hpU)
        U.2
    change PrimeSpectrum.basicOpen r ≤ U at hrU
    apply_fun (Spec.topMap (algebraMap R S) _* (structureSheaf S).1).map (homOfLE hrU).op at e
    simp only [TopCat.Presheaf.pushforwardObj_map, Functor.op_map, map_zero, ← comp_apply,
      toOpen_res] at e
    

Proof state:
case h₃.intro.intro.intro.intro.intro.intro.intro.intro
R S : CommRingCat
f : R ⟶ S
p : PrimeSpectrum ↑R
inst✝ : Algebra ↑R ↑S
x : ↑S
hx :
  (forget CommRingCat).map
      (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)
        { val := p, property := trivial })
      ((toOpen ↑S ⊤) x) =
    (forget CommRingCat).map
      (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)
        { val := p, property := trivial })
      0
U : TopologicalSpace.Opens ↑(Spec.topObj R)
hpU : p ∈ U
i₁ : U ⟶ ⊤
i₂ : U ⟶ ⊤
r : ↑R
hpr : p ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) r
hrU : PrimeSpectrum.basicOpen r ≤ U
e :
  ((structureSheaf ↑S).val.map
        ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)
      (((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₁.op.unop).op)
        ((toOpen ↑S ⊤) x)) =
    ((structureSheaf ↑S).val.map
        ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)
      (((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₂.op.unop).op)
        0)
⊢ ∃ m, m • x = 0

Next tactic:
have : toOpen S (PrimeSpectrum.basicOpen <| algebraMap R S r) x = 0 := by
      refine' Eq.trans _ e; rfl
instance isLocalizedModule_toPushforwardStalkAlgHom :
    IsLocalizedModule p.asIdeal.primeCompl (toPushforwardStalkAlgHom R S p).toLinearMap := by
  apply IsLocalizedModule.mkOfAlgebra
  · intro x hx; rw [algebraMap_pushforward_stalk, toPushforwardStalk_comp]
    change IsUnit ((TopCat.Presheaf.stalkFunctor CommRingCat p).map
      (Spec.sheafedSpaceMap (algebraMap ↑R ↑S)).c _)
    exact (IsLocalization.map_units ((structureSheaf R).presheaf.stalk p) ⟨x, hx⟩).map _
  · apply isLocalizedModule_toPushforwardStalkAlgHom_aux
  · intro x hx
    rw [toPushforwardStalkAlgHom_apply, ← (toPushforwardStalk (algebraMap R S) p).map_zero,
      toPushforwardStalk] at hx
    -- Porting note : this `change` is manually rewriting `comp_apply`
    change _ = (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)
      (⟨p, trivial⟩ : (⊤ : TopologicalSpace.Opens (PrimeSpectrum R))) (toOpen S ⊤ 0)) at hx
    rw [map_zero] at hx
    change (forget CommRingCat).map _ _ = (forget _).map _ _ at hx
    obtain ⟨U, hpU, i₁, i₂, e⟩ := TopCat.Presheaf.germ_eq _ _ _ _ _ _ hx
    obtain ⟨_, ⟨r, rfl⟩, hpr, hrU⟩ :=
      PrimeSpectrum.isTopologicalBasis_basic_opens.exists_subset_of_mem_open (show p ∈ U.1 from hpU)
        U.2
    change PrimeSpectrum.basicOpen r ≤ U at hrU
    apply_fun (Spec.topMap (algebraMap R S) _* (structureSheaf S).1).map (homOfLE hrU).op at e
    simp only [TopCat.Presheaf.pushforwardObj_map, Functor.op_map, map_zero, ← comp_apply,
      toOpen_res] at e
    have : toOpen S (PrimeSpectrum.basicOpen <| algebraMap R S r) x = 0 := by
      

Proof state:
R S : CommRingCat
f : R ⟶ S
p : PrimeSpectrum ↑R
inst✝ : Algebra ↑R ↑S
x : ↑S
hx :
  (forget CommRingCat).map
      (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)
        { val := p, property := trivial })
      ((toOpen ↑S ⊤) x) =
    (forget CommRingCat).map
      (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)
        { val := p, property := trivial })
      0
U : TopologicalSpace.Opens ↑(Spec.topObj R)
hpU : p ∈ U
i₁ : U ⟶ ⊤
i₂ : U ⟶ ⊤
r : ↑R
hpr : p ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) r
hrU : PrimeSpectrum.basicOpen r ≤ U
e :
  ((structureSheaf ↑S).val.map
        ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)
      (((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₁.op.unop).op)
        ((toOpen ↑S ⊤) x)) =
    ((structureSheaf ↑S).val.map
        ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)
      (((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₂.op.unop).op)
        0)
⊢ (toOpen (↑S) (PrimeSpectrum.basicOpen ((algebraMap ↑R ↑S) r))) x = 0

Next tactic:
refine' Eq.trans _ e
instance isLocalizedModule_toPushforwardStalkAlgHom :
    IsLocalizedModule p.asIdeal.primeCompl (toPushforwardStalkAlgHom R S p).toLinearMap := by
  apply IsLocalizedModule.mkOfAlgebra
  · intro x hx; rw [algebraMap_pushforward_stalk, toPushforwardStalk_comp]
    change IsUnit ((TopCat.Presheaf.stalkFunctor CommRingCat p).map
      (Spec.sheafedSpaceMap (algebraMap ↑R ↑S)).c _)
    exact (IsLocalization.map_units ((structureSheaf R).presheaf.stalk p) ⟨x, hx⟩).map _
  · apply isLocalizedModule_toPushforwardStalkAlgHom_aux
  · intro x hx
    rw [toPushforwardStalkAlgHom_apply, ← (toPushforwardStalk (algebraMap R S) p).map_zero,
      toPushforwardStalk] at hx
    -- Porting note : this `change` is manually rewriting `comp_apply`
    change _ = (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)
      (⟨p, trivial⟩ : (⊤ : TopologicalSpace.Opens (PrimeSpectrum R))) (toOpen S ⊤ 0)) at hx
    rw [map_zero] at hx
    change (forget CommRingCat).map _ _ = (forget _).map _ _ at hx
    obtain ⟨U, hpU, i₁, i₂, e⟩ := TopCat.Presheaf.germ_eq _ _ _ _ _ _ hx
    obtain ⟨_, ⟨r, rfl⟩, hpr, hrU⟩ :=
      PrimeSpectrum.isTopologicalBasis_basic_opens.exists_subset_of_mem_open (show p ∈ U.1 from hpU)
        U.2
    change PrimeSpectrum.basicOpen r ≤ U at hrU
    apply_fun (Spec.topMap (algebraMap R S) _* (structureSheaf S).1).map (homOfLE hrU).op at e
    simp only [TopCat.Presheaf.pushforwardObj_map, Functor.op_map, map_zero, ← comp_apply,
      toOpen_res] at e
    have : toOpen S (PrimeSpectrum.basicOpen <| algebraMap R S r) x = 0 := by
      refine' Eq.trans _ e; 

Proof state:
R S : CommRingCat
f : R ⟶ S
p : PrimeSpectrum ↑R
inst✝ : Algebra ↑R ↑S
x : ↑S
hx :
  (forget CommRingCat).map
      (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)
        { val := p, property := trivial })
      ((toOpen ↑S ⊤) x) =
    (forget CommRingCat).map
      (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)
        { val := p, property := trivial })
      0
U : TopologicalSpace.Opens ↑(Spec.topObj R)
hpU : p ∈ U
i₁ : U ⟶ ⊤
i₂ : U ⟶ ⊤
r : ↑R
hpr : p ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) r
hrU : PrimeSpectrum.basicOpen r ≤ U
e :
  ((structureSheaf ↑S).val.map
        ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)
      (((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₁.op.unop).op)
        ((toOpen ↑S ⊤) x)) =
    ((structureSheaf ↑S).val.map
        ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)
      (((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₂.op.unop).op)
        0)
⊢ (toOpen (↑S) (PrimeSpectrum.basicOpen ((algebraMap ↑R ↑S) r))) x =
    ((structureSheaf ↑S).val.map
        ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)
      (((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₁.op.unop).op)
        ((toOpen ↑S ⊤) x))

Next tactic:
rfl
instance isLocalizedModule_toPushforwardStalkAlgHom :
    IsLocalizedModule p.asIdeal.primeCompl (toPushforwardStalkAlgHom R S p).toLinearMap := by
  apply IsLocalizedModule.mkOfAlgebra
  · intro x hx; rw [algebraMap_pushforward_stalk, toPushforwardStalk_comp]
    change IsUnit ((TopCat.Presheaf.stalkFunctor CommRingCat p).map
      (Spec.sheafedSpaceMap (algebraMap ↑R ↑S)).c _)
    exact (IsLocalization.map_units ((structureSheaf R).presheaf.stalk p) ⟨x, hx⟩).map _
  · apply isLocalizedModule_toPushforwardStalkAlgHom_aux
  · intro x hx
    rw [toPushforwardStalkAlgHom_apply, ← (toPushforwardStalk (algebraMap R S) p).map_zero,
      toPushforwardStalk] at hx
    -- Porting note : this `change` is manually rewriting `comp_apply`
    change _ = (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)
      (⟨p, trivial⟩ : (⊤ : TopologicalSpace.Opens (PrimeSpectrum R))) (toOpen S ⊤ 0)) at hx
    rw [map_zero] at hx
    change (forget CommRingCat).map _ _ = (forget _).map _ _ at hx
    obtain ⟨U, hpU, i₁, i₂, e⟩ := TopCat.Presheaf.germ_eq _ _ _ _ _ _ hx
    obtain ⟨_, ⟨r, rfl⟩, hpr, hrU⟩ :=
      PrimeSpectrum.isTopologicalBasis_basic_opens.exists_subset_of_mem_open (show p ∈ U.1 from hpU)
        U.2
    change PrimeSpectrum.basicOpen r ≤ U at hrU
    apply_fun (Spec.topMap (algebraMap R S) _* (structureSheaf S).1).map (homOfLE hrU).op at e
    simp only [TopCat.Presheaf.pushforwardObj_map, Functor.op_map, map_zero, ← comp_apply,
      toOpen_res] at e
    have : toOpen S (PrimeSpectrum.basicOpen <| algebraMap R S r) x = 0 := by
      refine' Eq.trans _ e; rfl
    

Proof state:
case h₃.intro.intro.intro.intro.intro.intro.intro.intro
R S : CommRingCat
f : R ⟶ S
p : PrimeSpectrum ↑R
inst✝ : Algebra ↑R ↑S
x : ↑S
hx :
  (forget CommRingCat).map
      (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)
        { val := p, property := trivial })
      ((toOpen ↑S ⊤) x) =
    (forget CommRingCat).map
      (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)
        { val := p, property := trivial })
      0
U : TopologicalSpace.Opens ↑(Spec.topObj R)
hpU : p ∈ U
i₁ : U ⟶ ⊤
i₂ : U ⟶ ⊤
r : ↑R
hpr : p ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) r
hrU : PrimeSpectrum.basicOpen r ≤ U
e :
  ((structureSheaf ↑S).val.map
        ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)
      (((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₁.op.unop).op)
        ((toOpen ↑S ⊤) x)) =
    ((structureSheaf ↑S).val.map
        ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)
      (((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₂.op.unop).op)
        0)
this : (toOpen (↑S) (PrimeSpectrum.basicOpen ((algebraMap ↑R ↑S) r))) x = 0
⊢ ∃ m, m • x = 0

Next tactic:
have :=
      (@IsLocalization.mk'_one _ _ _ _ _ _
            (StructureSheaf.IsLocalization.to_basicOpen S <| algebraMap R S r) x).trans
        this
@[simp] lemma lift_le_lift : lift a ≤ lift b ↔ a ≤ b := ⟨by 

Proof state:
α : Type u_1
inst✝ : GeneralizedBooleanAlgebra α
x y : Booleanisation α
a b : α
⊢ lift a ≤ lift b → a ≤ b

Next tactic:
rintro ⟨_⟩
@[simp] lemma lift_le_lift : lift a ≤ lift b ↔ a ≤ b := ⟨by rintro ⟨_⟩; 

Proof state:
case lift
α : Type u_1
inst✝ : GeneralizedBooleanAlgebra α
x y : Booleanisation α
a b : α
a✝ : a ≤ b
⊢ a ≤ b

Next tactic:
assumption
@[simp] lemma comp_le_comp : comp a ≤ comp b ↔ b ≤ a := ⟨by 

Proof state:
α : Type u_1
inst✝ : GeneralizedBooleanAlgebra α
x y : Booleanisation α
a b : α
⊢ comp a ≤ comp b → b ≤ a

Next tactic:
rintro ⟨_⟩
@[simp] lemma comp_le_comp : comp a ≤ comp b ↔ b ≤ a := ⟨by rintro ⟨_⟩; 

Proof state:
case comp
α : Type u_1
inst✝ : GeneralizedBooleanAlgebra α
x y : Booleanisation α
a b : α
a✝ : b ≤ a
⊢ b ≤ a

Next tactic:
assumption
@[simp] lemma lift_le_comp : lift a ≤ comp b ↔ Disjoint a b := ⟨by 

Proof state:
α : Type u_1
inst✝ : GeneralizedBooleanAlgebra α
x y : Booleanisation α
a b : α
⊢ lift a ≤ comp b → Disjoint a b

Next tactic:
rintro ⟨_⟩
@[simp] lemma lift_le_comp : lift a ≤ comp b ↔ Disjoint a b := ⟨by rintro ⟨_⟩; 

Proof state:
case sep
α : Type u_1
inst✝ : GeneralizedBooleanAlgebra α
x y : Booleanisation α
a b : α
a✝ : Disjoint a b
⊢ Disjoint a b

Next tactic:
assumption
@[simp] lemma lift_lt_lift : lift a < lift b ↔ a < b := ⟨by 

Proof state:
α : Type u_1
inst✝ : GeneralizedBooleanAlgebra α
x y : Booleanisation α
a b : α
⊢ lift a < lift b → a < b

Next tactic:
rintro ⟨_⟩
@[simp] lemma lift_lt_lift : lift a < lift b ↔ a < b := ⟨by rintro ⟨_⟩; 

Proof state:
case lift
α : Type u_1
inst✝ : GeneralizedBooleanAlgebra α
x y : Booleanisation α
a b : α
a✝ : a < b
⊢ a < b

Next tactic:
assumption
@[simp] lemma comp_lt_comp : comp a < comp b ↔ b < a := ⟨by 

Proof state:
α : Type u_1
inst✝ : GeneralizedBooleanAlgebra α
x y : Booleanisation α
a b : α
⊢ comp a < comp b → b < a

Next tactic:
rintro ⟨_⟩
@[simp] lemma comp_lt_comp : comp a < comp b ↔ b < a := ⟨by rintro ⟨_⟩; 

Proof state:
case comp
α : Type u_1
inst✝ : GeneralizedBooleanAlgebra α
x y : Booleanisation α
a b : α
a✝ : b < a
⊢ b < a

Next tactic:
assumption
@[simp] lemma lift_lt_comp : lift a < comp b ↔ Disjoint a b := ⟨by 

Proof state:
α : Type u_1
inst✝ : GeneralizedBooleanAlgebra α
x y : Booleanisation α
a b : α
⊢ lift a < comp b → Disjoint a b

Next tactic:
rintro ⟨_⟩
@[simp] lemma lift_lt_comp : lift a < comp b ↔ Disjoint a b := ⟨by rintro ⟨_⟩; 

Proof state:
case sep
α : Type u_1
inst✝ : GeneralizedBooleanAlgebra α
x y : Booleanisation α
a b : α
a✝ : Disjoint a b
⊢ Disjoint a b

Next tactic:
assumption
instance instPreorder : Preorder (Booleanisation α) where
  lt := (· < ·)
  lt_iff_le_not_le x y := match x, y with
    | lift a, lift b => by 

Proof state:
α : Type u_1
inst✝ : GeneralizedBooleanAlgebra α
x✝ y✝ : Booleanisation α
a✝ b✝ : α
x y : Booleanisation α
a b : α
⊢ lift a < lift b ↔ lift a ≤ lift b ∧ ¬lift b ≤ lift a

Next tactic:
simp [lt_iff_le_not_le]
instance instPreorder : Preorder (Booleanisation α) where
  lt := (· < ·)
  lt_iff_le_not_le x y := match x, y with
    | lift a, lift b => by simp [lt_iff_le_not_le]
    | lift a, comp b => by 

Proof state:
α : Type u_1
inst✝ : GeneralizedBooleanAlgebra α
x✝ y✝ : Booleanisation α
a✝ b✝ : α
x y : Booleanisation α
a b : α
⊢ lift a < comp b ↔ lift a ≤ comp b ∧ ¬comp b ≤ lift a

Next tactic:
simp
instance instPreorder : Preorder (Booleanisation α) where
  lt := (· < ·)
  lt_iff_le_not_le x y := match x, y with
    | lift a, lift b => by simp [lt_iff_le_not_le]
    | lift a, comp b => by simp
    | comp a, lift b => by 

Proof state:
α : Type u_1
inst✝ : GeneralizedBooleanAlgebra α
x✝ y✝ : Booleanisation α
a✝ b✝ : α
x y : Booleanisation α
a b : α
⊢ comp a < lift b ↔ comp a ≤ lift b ∧ ¬lift b ≤ comp a

Next tactic:
simp
instance instPreorder : Preorder (Booleanisation α) where
  lt := (· < ·)
  lt_iff_le_not_le x y := match x, y with
    | lift a, lift b => by simp [lt_iff_le_not_le]
    | lift a, comp b => by simp
    | comp a, lift b => by simp
    | comp a, comp b => by 

Proof state:
α : Type u_1
inst✝ : GeneralizedBooleanAlgebra α
x✝ y✝ : Booleanisation α
a✝ b✝ : α
x y : Booleanisation α
a b : α
⊢ comp a < comp b ↔ comp a ≤ comp b ∧ ¬comp b ≤ comp a

Next tactic:
simp [lt_iff_le_not_le]
instance instPartialOrder : PartialOrder (Booleanisation α) where
  le_antisymm x y hxy hyx := match x, y, hxy, hyx with
    | lift a, lift b, LE.lift hab, LE.lift hba => by 

Proof state:
α : Type u_1
inst✝ : GeneralizedBooleanAlgebra α
x✝ y✝ : Booleanisation α
a✝ b✝ : α
x y : Booleanisation α
hxy : x ≤ y
hyx : y ≤ x
a b : α
hab : a ≤ b
hba : b ≤ a
⊢ lift a = lift b

Next tactic:
rw [hab.antisymm hba]
instance instPartialOrder : PartialOrder (Booleanisation α) where
  le_antisymm x y hxy hyx := match x, y, hxy, hyx with
    | lift a, lift b, LE.lift hab, LE.lift hba => by rw [hab.antisymm hba]
    | comp a, comp b, LE.comp hab, LE.comp hba => by 

Proof state:
α : Type u_1
inst✝ : GeneralizedBooleanAlgebra α
x✝ y✝ : Booleanisation α
a✝ b✝ : α
x y : Booleanisation α
hxy : x ≤ y
hyx : y ≤ x
a b : α
hab : b ≤ a
hba : a ≤ b
⊢ comp a = comp b

Next tactic:
rw [hab.antisymm hba]
instance instDistribLattice : DistribLattice (Booleanisation α) where
  inf_le_left _ _ := inf_le_left
  inf_le_right _ _ := inf_le_right
  le_inf _ _ _ := le_inf
  le_sup_inf x y z := match x, y, z with
    | lift a, lift b, lift c => LE.lift le_sup_inf
    | lift a, lift b, comp c => LE.lift $ by 

Proof state:
α : Type u_1
inst✝ : GeneralizedBooleanAlgebra α
x✝ y✝ : Booleanisation α
a✝ b✝ : α
x y z : Booleanisation α
a b c : α
⊢ (a ⊔ b) \ (c \ a) ≤ a ⊔ b \ c

Next tactic:
simp [sup_left_comm, sup_comm]
instance instDistribLattice : DistribLattice (Booleanisation α) where
  inf_le_left _ _ := inf_le_left
  inf_le_right _ _ := inf_le_right
  le_inf _ _ _ := le_inf
  le_sup_inf x y z := match x, y, z with
    | lift a, lift b, lift c => LE.lift le_sup_inf
    | lift a, lift b, comp c => LE.lift $ by simp [sup_left_comm, sup_comm]
    | lift a, comp b, lift c => LE.lift $ by 

Proof state:
α : Type u_1
inst✝ : GeneralizedBooleanAlgebra α
x✝ y✝ : Booleanisation α
a✝ b✝ : α
x y z : Booleanisation α
a b c : α
⊢ (a ⊔ c) \ (b \ a) ≤ a ⊔ c \ b

Next tactic:
simp [sup_left_comm, sup_comm (a := b \ a)]
instance instDistribLattice : DistribLattice (Booleanisation α) where
  inf_le_left _ _ := inf_le_left
  inf_le_right _ _ := inf_le_right
  le_inf _ _ _ := le_inf
  le_sup_inf x y z := match x, y, z with
    | lift a, lift b, lift c => LE.lift le_sup_inf
    | lift a, lift b, comp c => LE.lift $ by simp [sup_left_comm, sup_comm]
    | lift a, comp b, lift c => LE.lift $ by simp [sup_left_comm, sup_comm (a := b \ a)]
    | lift a, comp b, comp c => LE.comp $ by 

Proof state:
α : Type u_1
inst✝ : GeneralizedBooleanAlgebra α
x✝ y✝ : Booleanisation α
a✝ b✝ : α
x y z : Booleanisation α
a b c : α
⊢ (b ⊔ c) \ a ≤ b \ a ⊔ c \ a

Next tactic:
rw [sup_sdiff]