l3lab/ntp-mathlib huggingface dataset:
theorem supp_map (h : q.IsUniform) {α β : Type u} (g : α → β) (x : F α) :
    supp (g <$> x) = g '' supp x := by
  rw [← abs_repr x]; cases' repr x with a f; 

Proof state:
case mk
F : Type u → Type u
inst✝ : Functor F
q : QPF F
h : IsUniform
α β : Type u
g : α → β
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
⊢ supp (g <$> abs { fst := a, snd := f }) = g '' supp (abs { fst := a, snd := f })

Next tactic:
rw [← abs_map, PFunctor.map_eq]
theorem supp_map (h : q.IsUniform) {α β : Type u} (g : α → β) (x : F α) :
    supp (g <$> x) = g '' supp x := by
  rw [← abs_repr x]; cases' repr x with a f; rw [← abs_map, PFunctor.map_eq]
  

Proof state:
case mk
F : Type u → Type u
inst✝ : Functor F
q : QPF F
h : IsUniform
α β : Type u
g : α → β
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
⊢ supp (abs { fst := a, snd := g ∘ f }) = g '' supp (abs { fst := a, snd := f })

Next tactic:
rw [supp_eq_of_isUniform h, supp_eq_of_isUniform h, image_comp]
theorem suppPreservation_iff_uniform : q.SuppPreservation ↔ q.IsUniform := by
  

Proof state:
F : Type u → Type u
inst✝ : Functor F
q : QPF F
⊢ SuppPreservation ↔ IsUniform

Next tactic:
constructor
theorem suppPreservation_iff_uniform : q.SuppPreservation ↔ q.IsUniform := by
  constructor
  · 

Proof state:
case mp
F : Type u → Type u
inst✝ : Functor F
q : QPF F
⊢ SuppPreservation → IsUniform

Next tactic:
intro h α a a' f f' h'
theorem suppPreservation_iff_uniform : q.SuppPreservation ↔ q.IsUniform := by
  constructor
  · intro h α a a' f f' h'
    

Proof state:
case mp
F : Type u → Type u
inst✝ : Functor F
q : QPF F
h : SuppPreservation
α : Type u
a a' : (P F).A
f : PFunctor.B (P F) a → α
f' : PFunctor.B (P F) a' → α
h' : abs { fst := a, snd := f } = abs { fst := a', snd := f' }
⊢ f '' univ = f' '' univ

Next tactic:
rw [← PFunctor.supp_eq, ← PFunctor.supp_eq, ← h, h', h]
theorem suppPreservation_iff_uniform : q.SuppPreservation ↔ q.IsUniform := by
  constructor
  · intro h α a a' f f' h'
    rw [← PFunctor.supp_eq, ← PFunctor.supp_eq, ← h, h', h]
  · 

Proof state:
case mpr
F : Type u → Type u
inst✝ : Functor F
q : QPF F
⊢ IsUniform → SuppPreservation

Next tactic:
rintro h α ⟨a, f⟩
theorem suppPreservation_iff_uniform : q.SuppPreservation ↔ q.IsUniform := by
  constructor
  · intro h α a a' f f' h'
    rw [← PFunctor.supp_eq, ← PFunctor.supp_eq, ← h, h', h]
  · rintro h α ⟨a, f⟩
    

Proof state:
case mpr.mk
F : Type u → Type u
inst✝ : Functor F
q : QPF F
h : IsUniform
α : Type u
a : (P F).A
f : PFunctor.B (P F) a → α
⊢ supp (abs { fst := a, snd := f }) = supp { fst := a, snd := f }

Next tactic:
rwa [supp_eq_of_isUniform, PFunctor.supp_eq]
theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftpPreservation := by
  

Proof state:
F : Type u → Type u
inst✝ : Functor F
q : QPF F
⊢ SuppPreservation ↔ LiftpPreservation

Next tactic:
constructor
theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftpPreservation := by
  constructor <;> 

Proof state:
case mp
F : Type u → Type u
inst✝ : Functor F
q : QPF F
⊢ SuppPreservation → LiftpPreservation

Next tactic:
intro h
theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftpPreservation := by
  constructor <;> 

Proof state:
case mpr
F : Type u → Type u
inst✝ : Functor F
q : QPF F
⊢ LiftpPreservation → SuppPreservation

Next tactic:
intro h
theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftpPreservation := by
  constructor <;> intro h
  · 

Proof state:
case mp
F : Type u → Type u
inst✝ : Functor F
q : QPF F
h : SuppPreservation
⊢ LiftpPreservation

Next tactic:
rintro α p ⟨a, f⟩
theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftpPreservation := by
  constructor <;> intro h
  · rintro α p ⟨a, f⟩
    

Proof state:
case mp.mk
F : Type u → Type u
inst✝ : Functor F
q : QPF F
h : SuppPreservation
α : Type u
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
⊢ Liftp p (abs { fst := a, snd := f }) ↔ Liftp p { fst := a, snd := f }

Next tactic:
have h' := h
theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftpPreservation := by
  constructor <;> intro h
  · rintro α p ⟨a, f⟩
    have h' := h
    

Proof state:
case mp.mk
F : Type u → Type u
inst✝ : Functor F
q : QPF F
h : SuppPreservation
α : Type u
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
h' : SuppPreservation
⊢ Liftp p (abs { fst := a, snd := f }) ↔ Liftp p { fst := a, snd := f }

Next tactic:
rw [suppPreservation_iff_uniform] at h'
theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftpPreservation := by
  constructor <;> intro h
  · rintro α p ⟨a, f⟩
    have h' := h
    rw [suppPreservation_iff_uniform] at h'
    

Proof state:
case mp.mk
F : Type u → Type u
inst✝ : Functor F
q : QPF F
h : SuppPreservation
α : Type u
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
h' : IsUniform
⊢ Liftp p (abs { fst := a, snd := f }) ↔ Liftp p { fst := a, snd := f }

Next tactic:
dsimp only [SuppPreservation, supp] at h
theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftpPreservation := by
  constructor <;> intro h
  · rintro α p ⟨a, f⟩
    have h' := h
    rw [suppPreservation_iff_uniform] at h'
    dsimp only [SuppPreservation, supp] at h
    

Proof state:
case mp.mk
F : Type u → Type u
inst✝ : Functor F
q : QPF F
h :
  ∀ ⦃α : Type u⦄ (x : ↑(P F) α), {y | ∀ ⦃p : α → Prop⦄, Liftp p (abs x) → p y} = {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y}
α : Type u
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
h' : IsUniform
⊢ Liftp p (abs { fst := a, snd := f }) ↔ Liftp p { fst := a, snd := f }

Next tactic:
rw [liftp_iff_of_isUniform h', supp_eq_of_isUniform h', PFunctor.liftp_iff']
theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftpPreservation := by
  constructor <;> intro h
  · rintro α p ⟨a, f⟩
    have h' := h
    rw [suppPreservation_iff_uniform] at h'
    dsimp only [SuppPreservation, supp] at h
    rw [liftp_iff_of_isUniform h', supp_eq_of_isUniform h', PFunctor.liftp_iff']
    

Proof state:
case mp.mk
F : Type u → Type u
inst✝ : Functor F
q : QPF F
h :
  ∀ ⦃α : Type u⦄ (x : ↑(P F) α), {y | ∀ ⦃p : α → Prop⦄, Liftp p (abs x) → p y} = {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y}
α : Type u
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
h' : IsUniform
⊢ (∀ u ∈ f '' univ, p u) ↔ ∀ (i : PFunctor.B (P F) a), p (f i)

Next tactic:
simp only [image_univ, mem_range, exists_imp]
theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftpPreservation := by
  constructor <;> intro h
  · rintro α p ⟨a, f⟩
    have h' := h
    rw [suppPreservation_iff_uniform] at h'
    dsimp only [SuppPreservation, supp] at h
    rw [liftp_iff_of_isUniform h', supp_eq_of_isUniform h', PFunctor.liftp_iff']
    simp only [image_univ, mem_range, exists_imp]
    

Proof state:
case mp.mk
F : Type u → Type u
inst✝ : Functor F
q : QPF F
h :
  ∀ ⦃α : Type u⦄ (x : ↑(P F) α), {y | ∀ ⦃p : α → Prop⦄, Liftp p (abs x) → p y} = {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y}
α : Type u
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
h' : IsUniform
⊢ (∀ (u : α) (x : PFunctor.B (P F) a), f x = u → p u) ↔ ∀ (i : PFunctor.B (P F) a), p (f i)

Next tactic:
constructor
theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftpPreservation := by
  constructor <;> intro h
  · rintro α p ⟨a, f⟩
    have h' := h
    rw [suppPreservation_iff_uniform] at h'
    dsimp only [SuppPreservation, supp] at h
    rw [liftp_iff_of_isUniform h', supp_eq_of_isUniform h', PFunctor.liftp_iff']
    simp only [image_univ, mem_range, exists_imp]
    constructor <;> 

Proof state:
case mp.mk.mp
F : Type u → Type u
inst✝ : Functor F
q : QPF F
h :
  ∀ ⦃α : Type u⦄ (x : ↑(P F) α), {y | ∀ ⦃p : α → Prop⦄, Liftp p (abs x) → p y} = {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y}
α : Type u
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
h' : IsUniform
⊢ (∀ (u : α) (x : PFunctor.B (P F) a), f x = u → p u) → ∀ (i : PFunctor.B (P F) a), p (f i)

Next tactic:
intros
theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftpPreservation := by
  constructor <;> intro h
  · rintro α p ⟨a, f⟩
    have h' := h
    rw [suppPreservation_iff_uniform] at h'
    dsimp only [SuppPreservation, supp] at h
    rw [liftp_iff_of_isUniform h', supp_eq_of_isUniform h', PFunctor.liftp_iff']
    simp only [image_univ, mem_range, exists_imp]
    constructor <;> 

Proof state:
case mp.mk.mpr
F : Type u → Type u
inst✝ : Functor F
q : QPF F
h :
  ∀ ⦃α : Type u⦄ (x : ↑(P F) α), {y | ∀ ⦃p : α → Prop⦄, Liftp p (abs x) → p y} = {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y}
α : Type u
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
h' : IsUniform
⊢ (∀ (i : PFunctor.B (P F) a), p (f i)) → ∀ (u : α) (x : PFunctor.B (P F) a), f x = u → p u

Next tactic:
intros
theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftpPreservation := by
  constructor <;> intro h
  · rintro α p ⟨a, f⟩
    have h' := h
    rw [suppPreservation_iff_uniform] at h'
    dsimp only [SuppPreservation, supp] at h
    rw [liftp_iff_of_isUniform h', supp_eq_of_isUniform h', PFunctor.liftp_iff']
    simp only [image_univ, mem_range, exists_imp]
    constructor <;> intros <;> 

Proof state:
case mp.mk.mp
F : Type u → Type u
inst✝ : Functor F
q : QPF F
h :
  ∀ ⦃α : Type u⦄ (x : ↑(P F) α), {y | ∀ ⦃p : α → Prop⦄, Liftp p (abs x) → p y} = {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y}
α : Type u
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
h' : IsUniform
a✝ : ∀ (u : α) (x : PFunctor.B (P F) a), f x = u → p u
i✝ : PFunctor.B (P F) a
⊢ p (f i✝)

Next tactic:
subst_vars
theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftpPreservation := by
  constructor <;> intro h
  · rintro α p ⟨a, f⟩
    have h' := h
    rw [suppPreservation_iff_uniform] at h'
    dsimp only [SuppPreservation, supp] at h
    rw [liftp_iff_of_isUniform h', supp_eq_of_isUniform h', PFunctor.liftp_iff']
    simp only [image_univ, mem_range, exists_imp]
    constructor <;> intros <;> 

Proof state:
case mp.mk.mpr
F : Type u → Type u
inst✝ : Functor F
q : QPF F
h :
  ∀ ⦃α : Type u⦄ (x : ↑(P F) α), {y | ∀ ⦃p : α → Prop⦄, Liftp p (abs x) → p y} = {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y}
α : Type u
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
h' : IsUniform
a✝¹ : ∀ (i : PFunctor.B (P F) a), p (f i)
u✝ : α
x✝ : PFunctor.B (P F) a
a✝ : f x✝ = u✝
⊢ p u✝

Next tactic:
subst_vars
theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftpPreservation := by
  constructor <;> intro h
  · rintro α p ⟨a, f⟩
    have h' := h
    rw [suppPreservation_iff_uniform] at h'
    dsimp only [SuppPreservation, supp] at h
    rw [liftp_iff_of_isUniform h', supp_eq_of_isUniform h', PFunctor.liftp_iff']
    simp only [image_univ, mem_range, exists_imp]
    constructor <;> intros <;> subst_vars <;> 

Proof state:
case mp.mk.mp
F : Type u → Type u
inst✝ : Functor F
q : QPF F
h :
  ∀ ⦃α : Type u⦄ (x : ↑(P F) α), {y | ∀ ⦃p : α → Prop⦄, Liftp p (abs x) → p y} = {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y}
α : Type u
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
h' : IsUniform
a✝ : ∀ (u : α) (x : PFunctor.B (P F) a), f x = u → p u
i✝ : PFunctor.B (P F) a
⊢ p (f i✝)

Next tactic:
solve_by_elim
theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftpPreservation := by
  constructor <;> intro h
  · rintro α p ⟨a, f⟩
    have h' := h
    rw [suppPreservation_iff_uniform] at h'
    dsimp only [SuppPreservation, supp] at h
    rw [liftp_iff_of_isUniform h', supp_eq_of_isUniform h', PFunctor.liftp_iff']
    simp only [image_univ, mem_range, exists_imp]
    constructor <;> intros <;> subst_vars <;> 

Proof state:
case mp.mk.mpr
F : Type u → Type u
inst✝ : Functor F
q : QPF F
h :
  ∀ ⦃α : Type u⦄ (x : ↑(P F) α), {y | ∀ ⦃p : α → Prop⦄, Liftp p (abs x) → p y} = {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y}
α : Type u
p : α → Prop
a : (P F).A
f : PFunctor.B (P F) a → α
h' : IsUniform
a✝ : ∀ (i : PFunctor.B (P F) a), p (f i)
x✝ : PFunctor.B (P F) a
⊢ p (f x✝)

Next tactic:
solve_by_elim
theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftpPreservation := by
  constructor <;> intro h
  · rintro α p ⟨a, f⟩
    have h' := h
    rw [suppPreservation_iff_uniform] at h'
    dsimp only [SuppPreservation, supp] at h
    rw [liftp_iff_of_isUniform h', supp_eq_of_isUniform h', PFunctor.liftp_iff']
    simp only [image_univ, mem_range, exists_imp]
    constructor <;> intros <;> subst_vars <;> solve_by_elim
  · 

Proof state:
case mpr
F : Type u → Type u
inst✝ : Functor F
q : QPF F
h : LiftpPreservation
⊢ SuppPreservation

Next tactic:
rintro α ⟨a, f⟩
theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftpPreservation := by
  constructor <;> intro h
  · rintro α p ⟨a, f⟩
    have h' := h
    rw [suppPreservation_iff_uniform] at h'
    dsimp only [SuppPreservation, supp] at h
    rw [liftp_iff_of_isUniform h', supp_eq_of_isUniform h', PFunctor.liftp_iff']
    simp only [image_univ, mem_range, exists_imp]
    constructor <;> intros <;> subst_vars <;> solve_by_elim
  · rintro α ⟨a, f⟩
    

Proof state:
case mpr.mk
F : Type u → Type u
inst✝ : Functor F
q : QPF F
h : LiftpPreservation
α : Type u
a : (P F).A
f : PFunctor.B (P F) a → α
⊢ supp (abs { fst := a, snd := f }) = supp { fst := a, snd := f }

Next tactic:
simp only [LiftpPreservation] at h
theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftpPreservation := by
  constructor <;> intro h
  · rintro α p ⟨a, f⟩
    have h' := h
    rw [suppPreservation_iff_uniform] at h'
    dsimp only [SuppPreservation, supp] at h
    rw [liftp_iff_of_isUniform h', supp_eq_of_isUniform h', PFunctor.liftp_iff']
    simp only [image_univ, mem_range, exists_imp]
    constructor <;> intros <;> subst_vars <;> solve_by_elim
  · rintro α ⟨a, f⟩
    simp only [LiftpPreservation] at h
    

Proof state:
case mpr.mk
F : Type u → Type u
inst✝ : Functor F
q : QPF F
h : ∀ ⦃α : Type u⦄ (p : α → Prop) (x : ↑(P F) α), Liftp p (abs x) ↔ Liftp p x
α : Type u
a : (P F).A
f : PFunctor.B (P F) a → α
⊢ supp (abs { fst := a, snd := f }) = supp { fst := a, snd := f }

Next tactic:
simp only [supp, h]
theorem liftpPreservation_iff_uniform : q.LiftpPreservation ↔ q.IsUniform := by
  

Proof state:
F : Type u → Type u
inst✝ : Functor F
q : QPF F
⊢ LiftpPreservation ↔ IsUniform

Next tactic:
rw [← suppPreservation_iff_liftpPreservation, suppPreservation_iff_uniform]
/-- The functor from `CompHaus` to `Condensed.{u} (Type u)` given by the Yoneda sheaf. -/
def compHausToCondensed' : CompHaus.{u} ⥤ Condensed.{u} (Type u) where
  obj S := {
    val := yoneda.obj S
    cond := by
      

Proof state:
S : CompHaus
⊢ Presheaf.IsSheaf (coherentTopology CompHaus) (yoneda.obj S)

Next tactic:
rw [isSheaf_iff_isSheaf_of_type]
/-- The functor from `CompHaus` to `Condensed.{u} (Type u)` given by the Yoneda sheaf. -/
def compHausToCondensed' : CompHaus.{u} ⥤ Condensed.{u} (Type u) where
  obj S := {
    val := yoneda.obj S
    cond := by
      rw [isSheaf_iff_isSheaf_of_type]
      

Proof state:
S : CompHaus
⊢ Presieve.IsSheaf (coherentTopology CompHaus) (yoneda.obj S)

Next tactic:
exact coherentTopology.isSheaf_yoneda_obj S
theorem IsInt.to_isNat {α} [Ring α] : ∀ {a : α} {n}, IsInt a (.ofNat n) → IsNat a n
  | _, _, ⟨rfl⟩ => ⟨by 

Proof state:
α : Type u_1
inst✝ : Ring α
a✝ : ℕ
⊢ ↑(Int.ofNat a✝) = ↑a✝

Next tactic:
simp
theorem IsNat.to_isInt {α} [Ring α] : ∀ {a : α} {n}, IsNat a n → IsInt a (.ofNat n)
  | _, _, ⟨rfl⟩ => ⟨by 

Proof state:
α : Type u_1
inst✝ : Ring α
n✝ : ℕ
⊢ ↑n✝ = ↑(Int.ofNat n✝)

Next tactic:
simp
theorem IsInt.neg_to_eq {α} [Ring α] {n} :
    {a a' : α} → IsInt a (.negOfNat n) → n = a' → a = -a'
  | _, _, ⟨rfl⟩, rfl => by 

Proof state:
α : Type u_1
inst✝ : Ring α
n : ℕ
⊢ ↑(Int.negOfNat n) = -↑n

Next tactic:
simp [Int.negOfNat_eq, Int.cast_neg]
theorem IsRat.to_isNat {α} [Ring α] : ∀ {a : α} {n}, IsRat a (.ofNat n) (nat_lit 1) → IsNat a n
  | _, _, ⟨inv, rfl⟩ => have := @invertibleOne α _; ⟨by 

Proof state:
α : Type u_1
inst✝ : Ring α
a✝ : ℕ
inv : Invertible ↑1
this : Invertible 1
⊢ ↑(Int.ofNat a✝) * ⅟↑1 = ↑a✝

Next tactic:
simp
theorem IsNat.to_isRat {α} [Ring α] : ∀ {a : α} {n}, IsNat a n → IsRat a (.ofNat n) (nat_lit 1)
  | _, _, ⟨rfl⟩ => ⟨⟨1, by 

Proof state:
α : Type u_1
inst✝ : Ring α
n✝ : ℕ
⊢ 1 * ↑1 = 1

Next tactic:
simp
theorem IsNat.to_isRat {α} [Ring α] : ∀ {a : α} {n}, IsNat a n → IsRat a (.ofNat n) (nat_lit 1)
  | _, _, ⟨rfl⟩ => ⟨⟨1, by simp, by 

Proof state:
α : Type u_1
inst✝ : Ring α
n✝ : ℕ
⊢ ↑1 * 1 = 1

Next tactic:
simp
theorem IsNat.to_isRat {α} [Ring α] : ∀ {a : α} {n}, IsNat a n → IsRat a (.ofNat n) (nat_lit 1)
  | _, _, ⟨rfl⟩ => ⟨⟨1, by simp, by simp⟩, by 

Proof state:
α : Type u_1
inst✝ : Ring α
n✝ : ℕ
⊢ ↑n✝ = ↑(Int.ofNat n✝) * ⅟↑1

Next tactic:
simp
theorem IsRat.to_isInt {α} [Ring α] : ∀ {a : α} {n}, IsRat a n (nat_lit 1) → IsInt a n
  | _, _, ⟨inv, rfl⟩ => have := @invertibleOne α _; ⟨by 

Proof state:
α : Type u_1
inst✝ : Ring α
num✝ : ℤ
inv : Invertible ↑1
this : Invertible 1
⊢ ↑num✝ * ⅟↑1 = ↑num✝

Next tactic:
simp
theorem IsInt.to_isRat {α} [Ring α] : ∀ {a : α} {n}, IsInt a n → IsRat a n (nat_lit 1)
  | _, _, ⟨rfl⟩ => ⟨⟨1, by 

Proof state:
α : Type u_1
inst✝ : Ring α
n✝ : ℤ
⊢ 1 * ↑1 = 1

Next tactic:
simp
theorem IsInt.to_isRat {α} [Ring α] : ∀ {a : α} {n}, IsInt a n → IsRat a n (nat_lit 1)
  | _, _, ⟨rfl⟩ => ⟨⟨1, by simp, by 

Proof state:
α : Type u_1
inst✝ : Ring α
n✝ : ℤ
⊢ ↑1 * 1 = 1

Next tactic:
simp
theorem IsInt.to_isRat {α} [Ring α] : ∀ {a : α} {n}, IsInt a n → IsRat a n (nat_lit 1)
  | _, _, ⟨rfl⟩ => ⟨⟨1, by simp, by simp⟩, by 

Proof state:
α : Type u_1
inst✝ : Ring α
n✝ : ℤ
⊢ ↑n✝ = ↑n✝ * ⅟↑1

Next tactic:
simp
theorem IsRat.to_raw_eq [DivisionRing α] : ∀ {a}, IsRat (a : α) n d → a = Rat.rawCast n d
  | _, ⟨inv, rfl⟩ => by 

Proof state:
α : Type u_1
n : ℤ
d : ℕ
inst✝ : DivisionRing α
inv : Invertible ↑d
⊢ ↑n * ⅟↑d = Rat.rawCast n d

Next tactic:
simp [div_eq_mul_inv]
theorem IsRat.neg_to_eq {α} [DivisionRing α] {n d} :
    {a n' d' : α} → IsRat a (.negOfNat n) d → n = n' → d = d' → a = -(n' / d')
  | _, _, _, ⟨_, rfl⟩, rfl, rfl => by 

Proof state:
α : Type u_1
inst✝ : DivisionRing α
n d : ℕ
inv✝ : Invertible ↑d
⊢ ↑(Int.negOfNat n) * ⅟↑d = -(↑n / ↑d)

Next tactic:
simp [div_eq_mul_inv]
theorem IsRat.nonneg_to_eq {α} [DivisionRing α] {n d} :
    {a n' d' : α} → IsRat a (.ofNat n) d → n = n' → d = d' → a = n' / d'
  | _, _, _, ⟨_, rfl⟩, rfl, rfl => by 

Proof state:
α : Type u_1
inst✝ : DivisionRing α
n d : ℕ
inv✝ : Invertible ↑d
⊢ ↑(Int.ofNat n) * ⅟↑d = ↑n / ↑d

Next tactic:
simp [div_eq_mul_inv]
theorem IsRat.of_raw (α) [DivisionRing α] (n : ℤ) (d : ℕ)
    (h : (d : α) ≠ 0) : IsRat (Rat.rawCast n d : α) n d :=
  have := invertibleOfNonzero h
  ⟨this, by 

Proof state:
α : Type u_1
inst✝ : DivisionRing α
n : ℤ
d : ℕ
h : ↑d ≠ 0
this : Invertible ↑d
⊢ Rat.rawCast n d = ↑n * ⅟↑d

Next tactic:
simp [div_eq_mul_inv]
/-- The prime spectrum of `R × S` is in bijection with the disjoint unions of the prime spectrum of
`R` and the prime spectrum of `S`. -/
noncomputable def primeSpectrumProd :
    PrimeSpectrum (R × S) ≃ Sum (PrimeSpectrum R) (PrimeSpectrum S) :=
  Equiv.symm <|
    Equiv.ofBijective (primeSpectrumProdOfSum R S) (by
        

Proof state:
R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
⊢ Function.Bijective (primeSpectrumProdOfSum R S)

Next tactic:
constructor
/-- The prime spectrum of `R × S` is in bijection with the disjoint unions of the prime spectrum of
`R` and the prime spectrum of `S`. -/
noncomputable def primeSpectrumProd :
    PrimeSpectrum (R × S) ≃ Sum (PrimeSpectrum R) (PrimeSpectrum S) :=
  Equiv.symm <|
    Equiv.ofBijective (primeSpectrumProdOfSum R S) (by
        constructor
        · 

Proof state:
case left
R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
⊢ Function.Injective (primeSpectrumProdOfSum R S)

Next tactic:
rintro (⟨I, hI⟩ | ⟨J, hJ⟩) (⟨I', hI'⟩ | ⟨J', hJ'⟩) h
/-- The prime spectrum of `R × S` is in bijection with the disjoint unions of the prime spectrum of
`R` and the prime spectrum of `S`. -/
noncomputable def primeSpectrumProd :
    PrimeSpectrum (R × S) ≃ Sum (PrimeSpectrum R) (PrimeSpectrum S) :=
  Equiv.symm <|
    Equiv.ofBijective (primeSpectrumProdOfSum R S) (by
        constructor
        · rintro (⟨I, hI⟩ | ⟨J, hJ⟩) (⟨I', hI'⟩ | ⟨J', hJ'⟩) h <;>
          

Proof state:
case left.inl.mk.inl.mk
R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
I : Ideal R
hI : Ideal.IsPrime I
I' : Ideal R
hI' : Ideal.IsPrime I'
h :
  primeSpectrumProdOfSum R S (Sum.inl { asIdeal := I, IsPrime := hI }) =
    primeSpectrumProdOfSum R S (Sum.inl { asIdeal := I', IsPrime := hI' })
⊢ Sum.inl { asIdeal := I, IsPrime := hI } = Sum.inl { asIdeal := I', IsPrime := hI' }

Next tactic:
simp only [mk.injEq, Ideal.prod.ext_iff, primeSpectrumProdOfSum] at h
/-- The prime spectrum of `R × S` is in bijection with the disjoint unions of the prime spectrum of
`R` and the prime spectrum of `S`. -/
noncomputable def primeSpectrumProd :
    PrimeSpectrum (R × S) ≃ Sum (PrimeSpectrum R) (PrimeSpectrum S) :=
  Equiv.symm <|
    Equiv.ofBijective (primeSpectrumProdOfSum R S) (by
        constructor
        · rintro (⟨I, hI⟩ | ⟨J, hJ⟩) (⟨I', hI'⟩ | ⟨J', hJ'⟩) h <;>
          

Proof state:
case left.inl.mk.inr.mk
R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
I : Ideal R
hI : Ideal.IsPrime I
J' : Ideal S
hJ' : Ideal.IsPrime J'
h :
  primeSpectrumProdOfSum R S (Sum.inl { asIdeal := I, IsPrime := hI }) =
    primeSpectrumProdOfSum R S (Sum.inr { asIdeal := J', IsPrime := hJ' })
⊢ Sum.inl { asIdeal := I, IsPrime := hI } = Sum.inr { asIdeal := J', IsPrime := hJ' }

Next tactic:
simp only [mk.injEq, Ideal.prod.ext_iff, primeSpectrumProdOfSum] at h
/-- The prime spectrum of `R × S` is in bijection with the disjoint unions of the prime spectrum of
`R` and the prime spectrum of `S`. -/
noncomputable def primeSpectrumProd :
    PrimeSpectrum (R × S) ≃ Sum (PrimeSpectrum R) (PrimeSpectrum S) :=
  Equiv.symm <|
    Equiv.ofBijective (primeSpectrumProdOfSum R S) (by
        constructor
        · rintro (⟨I, hI⟩ | ⟨J, hJ⟩) (⟨I', hI'⟩ | ⟨J', hJ'⟩) h <;>
          

Proof state:
case left.inr.mk.inl.mk
R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
J : Ideal S
hJ : Ideal.IsPrime J
I' : Ideal R
hI' : Ideal.IsPrime I'
h :
  primeSpectrumProdOfSum R S (Sum.inr { asIdeal := J, IsPrime := hJ }) =
    primeSpectrumProdOfSum R S (Sum.inl { asIdeal := I', IsPrime := hI' })
⊢ Sum.inr { asIdeal := J, IsPrime := hJ } = Sum.inl { asIdeal := I', IsPrime := hI' }

Next tactic:
simp only [mk.injEq, Ideal.prod.ext_iff, primeSpectrumProdOfSum] at h
/-- The prime spectrum of `R × S` is in bijection with the disjoint unions of the prime spectrum of
`R` and the prime spectrum of `S`. -/
noncomputable def primeSpectrumProd :
    PrimeSpectrum (R × S) ≃ Sum (PrimeSpectrum R) (PrimeSpectrum S) :=
  Equiv.symm <|
    Equiv.ofBijective (primeSpectrumProdOfSum R S) (by
        constructor
        · rintro (⟨I, hI⟩ | ⟨J, hJ⟩) (⟨I', hI'⟩ | ⟨J', hJ'⟩) h <;>
          

Proof state:
case left.inr.mk.inr.mk
R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
J : Ideal S
hJ : Ideal.IsPrime J
J' : Ideal S
hJ' : Ideal.IsPrime J'
h :
  primeSpectrumProdOfSum R S (Sum.inr { asIdeal := J, IsPrime := hJ }) =
    primeSpectrumProdOfSum R S (Sum.inr { asIdeal := J', IsPrime := hJ' })
⊢ Sum.inr { asIdeal := J, IsPrime := hJ } = Sum.inr { asIdeal := J', IsPrime := hJ' }

Next tactic:
simp only [mk.injEq, Ideal.prod.ext_iff, primeSpectrumProdOfSum] at h
/-- The prime spectrum of `R × S` is in bijection with the disjoint unions of the prime spectrum of
`R` and the prime spectrum of `S`. -/
noncomputable def primeSpectrumProd :
    PrimeSpectrum (R × S) ≃ Sum (PrimeSpectrum R) (PrimeSpectrum S) :=
  Equiv.symm <|
    Equiv.ofBijective (primeSpectrumProdOfSum R S) (by
        constructor
        · rintro (⟨I, hI⟩ | ⟨J, hJ⟩) (⟨I', hI'⟩ | ⟨J', hJ'⟩) h <;>
          simp only [mk.injEq, Ideal.prod.ext_iff, primeSpectrumProdOfSum] at h
          · 

Proof state:
case left.inl.mk.inl.mk
R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
I : Ideal R
hI : Ideal.IsPrime I
I' : Ideal R
hI' : Ideal.IsPrime I'
h : I = I' ∧ True
⊢ Sum.inl { asIdeal := I, IsPrime := hI } = Sum.inl { asIdeal := I', IsPrime := hI' }

Next tactic:
simp only [h]