Theorem: AlgebraicGeometry.StructureSheaf.normalize_finite_fraction_representation
File: Mathlib/AlgebraicGeometry/StructureSheaf.lean

tactic: have fractions_eq :
  ∀ i j : ι,
    IsLocalization.mk' (Localization.Away (h i * h j))
      (a i * h j) ⟨h i * h j, Submonoid.mem_powers _⟩ =
    IsLocalization.mk' _ (h i * a j) ⟨h i * h j, Submonoid.mem_powers _⟩ := by
  intro i j
  let D := PrimeSpectrum.basicOpen (h i * h j)
  let iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE (PrimeSpectrum.basicOpen_mul_le_left _ _)
  let iDj : D ⟶ PrimeSpectrum.basicOpen (h j) :=
    homOfLE (PrimeSpectrum.basicOpen_mul_le_right _ _)
  apply toBasicOpen_injective R (h i * h j)
  rw [toBasicOpen_mk', toBasicOpen_mk']
  simp only []
  trans
  on_goal 1 =>
    convert congr_arg ((structureSheaf R).1.map iDj.op) (hs j).symm using 1
    convert congr_arg ((structureSheaf R).1.map iDi.op) (hs i) using 1
  all_goals rw [res_const]; apply const_ext; ring
  exacts [PrimeSpectrum.basicOpen_mul_le_left _ _, PrimeSpectrum.basicOpen_mul_le_right _ _]
state_before: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
⊢ ∃ a' h' iDh',
    U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h' i) ∧
      (∀ i ∈ t, ∀ j ∈ t, a' i * h' j = h' i * a' j) ∧
        ∀ i ∈ t, ((structureSheaf R).val.map (iDh' i).op) s = const R (a' i) (h' i) (PrimeSpectrum.basicOpen (h' i)) ⋯
state_after: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
⊢ ∃ a' h' iDh',
    U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h' i) ∧
      (∀ i ∈ t, ∀ j ∈ t, a' i * h' j = h' i * a' j) ∧
        ∀ i ∈ t, ((structureSheaf R).val.map (iDh' i).op) s = const R (a' i) (h' i) (PrimeSpectrum.basicOpen (h' i)) ⋯

tactic: have exists_power :
  ∀ i j : ι, ∃ n : ℕ, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n := by
  intro i j
  obtain ⟨⟨c, n, rfl⟩, hc⟩ := IsLocalization.eq.mp (fractions_eq i j)
  use n + 1
  rw [pow_succ]
  dsimp at hc
  convert hc using 1 <;> ring
state_before: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
⊢ ∃ a' h' iDh',
    U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h' i) ∧
      (∀ i ∈ t, ∀ j ∈ t, a' i * h' j = h' i * a' j) ∧
        ∀ i ∈ t, ((structureSheaf R).val.map (iDh' i).op) s = const R (a' i) (h' i) (PrimeSpectrum.basicOpen (h' i)) ⋯
state_after: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
⊢ ∃ a' h' iDh',
    U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h' i) ∧
      (∀ i ∈ t, ∀ j ∈ t, a' i * h' j = h' i * a' j) ∧
        ∀ i ∈ t, ((structureSheaf R).val.map (iDh' i).op) s = const R (a' i) (h' i) (PrimeSpectrum.basicOpen (h' i)) ⋯

tactic: let n := fun p : ι × ι => (exists_power p.1 p.2).choose
state_before: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
⊢ ∃ a' h' iDh',
    U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h' i) ∧
      (∀ i ∈ t, ∀ j ∈ t, a' i * h' j = h' i * a' j) ∧
        ∀ i ∈ t, ((structureSheaf R).val.map (iDh' i).op) s = const R (a' i) (h' i) (PrimeSpectrum.basicOpen (h' i)) ⋯
state_after: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
⊢ ∃ a' h' iDh',
    U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h' i) ∧
      (∀ i ∈ t, ∀ j ∈ t, a' i * h' j = h' i * a' j) ∧
        ∀ i ∈ t, ((structureSheaf R).val.map (iDh' i).op) s = const R (a' i) (h' i) (PrimeSpectrum.basicOpen (h' i)) ⋯

tactic: have n_spec := fun p : ι × ι => (exists_power p.fst p.snd).choose_spec
state_before: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
⊢ ∃ a' h' iDh',
    U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h' i) ∧
      (∀ i ∈ t, ∀ j ∈ t, a' i * h' j = h' i * a' j) ∧
        ∀ i ∈ t, ((structureSheaf R).val.map (iDh' i).op) s = const R (a' i) (h' i) (PrimeSpectrum.basicOpen (h' i)) ⋯
state_after: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
⊢ ∃ a' h' iDh',
    U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h' i) ∧
      (∀ i ∈ t, ∀ j ∈ t, a' i * h' j = h' i * a' j) ∧
        ∀ i ∈ t, ((structureSheaf R).val.map (iDh' i).op) s = const R (a' i) (h' i) (PrimeSpectrum.basicOpen (h' i)) ⋯

tactic: let N := (t ×ˢ t).sup n
state_before: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
⊢ ∃ a' h' iDh',
    U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h' i) ∧
      (∀ i ∈ t, ∀ j ∈ t, a' i * h' j = h' i * a' j) ∧
        ∀ i ∈ t, ((structureSheaf R).val.map (iDh' i).op) s = const R (a' i) (h' i) (PrimeSpectrum.basicOpen (h' i)) ⋯
state_after: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
⊢ ∃ a' h' iDh',
    U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h' i) ∧
      (∀ i ∈ t, ∀ j ∈ t, a' i * h' j = h' i * a' j) ∧
        ∀ i ∈ t, ((structureSheaf R).val.map (iDh' i).op) s = const R (a' i) (h' i) (PrimeSpectrum.basicOpen (h' i)) ⋯

tactic: have basic_opens_eq : ∀ i : ι, PrimeSpectrum.basicOpen (h i ^ (N + 1)) =
  PrimeSpectrum.basicOpen (h i) := fun i => PrimeSpectrum.basicOpen_pow _ _ (by omega)
state_before: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
⊢ ∃ a' h' iDh',
    U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h' i) ∧
      (∀ i ∈ t, ∀ j ∈ t, a' i * h' j = h' i * a' j) ∧
        ∀ i ∈ t, ((structureSheaf R).val.map (iDh' i).op) s = const R (a' i) (h' i) (PrimeSpectrum.basicOpen (h' i)) ⋯
state_after: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
⊢ ∃ a' h' iDh',
    U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h' i) ∧
      (∀ i ∈ t, ∀ j ∈ t, a' i * h' j = h' i * a' j) ∧
        ∀ i ∈ t, ((structureSheaf R).val.map (iDh' i).op) s = const R (a' i) (h' i) (PrimeSpectrum.basicOpen (h' i)) ⋯

tactic: refine
  ⟨fun i => a i * h i ^ N, fun i => h i ^ (N + 1), fun i => eqToHom (basic_opens_eq i) ≫ iDh i,
    ?_, ?_, ?_⟩
state_before: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
⊢ ∃ a' h' iDh',
    U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h' i) ∧
      (∀ i ∈ t, ∀ j ∈ t, a' i * h' j = h' i * a' j) ∧
        ∀ i ∈ t, ((structureSheaf R).val.map (iDh' i).op) s = const R (a' i) (h' i) (PrimeSpectrum.basicOpen (h' i)) ⋯
state_after: case refine_1
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
⊢ U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i)

case refine_2
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
⊢ ∀ i ∈ t,
    ∀ j ∈ t,
      (fun i => a i * h i ^ N) i * (fun i => h i ^ (N + 1)) j = (fun i => h i ^ (N + 1)) i * (fun i => a i * h i ^ N) j

case refine_3
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
⊢ ∀ i ∈ t,
    ((structureSheaf R).val.map ((fun i => eqToHom ⋯ ≫ iDh i) i).op) s =
      const R ((fun i => a i * h i ^ N) i) ((fun i => h i ^ (N + 1)) i)
        (PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i)) ⋯

tactic: intro i _
state_before: case refine_3
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
⊢ ∀ i ∈ t,
    ((structureSheaf R).val.map ((fun i => eqToHom ⋯ ≫ iDh i) i).op) s =
      const R ((fun i => a i * h i ^ N) i) ((fun i => h i ^ (N + 1)) i)
        (PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i)) ⋯
state_after: case refine_3
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ ((structureSheaf R).val.map ((fun i => eqToHom ⋯ ≫ iDh i) i).op) s =
    const R ((fun i => a i * h i ^ N) i) ((fun i => h i ^ (N + 1)) i)
      (PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i)) ⋯

tactic: rw [op_comp, Functor.map_comp]
state_before: case refine_3
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ ((structureSheaf R).val.map ((fun i => eqToHom ⋯ ≫ iDh i) i).op) s =
    const R ((fun i => a i * h i ^ N) i) ((fun i => h i ^ (N + 1)) i)
      (PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i)) ⋯
state_after: case refine_3
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ ((structureSheaf R).val.map (iDh i).op ≫ (structureSheaf R).val.map (eqToHom ⋯).op) s =
    const R ((fun i => a i * h i ^ N) i) ((fun i => h i ^ (N + 1)) i)
      (PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i)) ⋯

tactic: change (structureSheaf R).1.map (eqToHom (basic_opens_eq _)).op
  ((structureSheaf R).1.map (iDh i).op s) = _
state_before: case refine_3
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ ((structureSheaf R).val.map (iDh i).op ≫ (structureSheaf R).val.map (eqToHom ⋯).op) s =
    const R ((fun i => a i * h i ^ N) i) ((fun i => h i ^ (N + 1)) i)
      (PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i)) ⋯
state_after: case refine_3
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ ((structureSheaf R).val.map (eqToHom ⋯).op) (((structureSheaf R).val.map (iDh i).op) s) =
    const R ((fun i => a i * h i ^ N) i) ((fun i => h i ^ (N + 1)) i)
      (PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i)) ⋯

tactic: rw [← hs, res_const]
state_before: case refine_3
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ ((structureSheaf R).val.map (eqToHom ⋯).op) (((structureSheaf R).val.map (iDh i).op) s) =
    const R ((fun i => a i * h i ^ N) i) ((fun i => h i ^ (N + 1)) i)
      (PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i)) ⋯
state_after: case refine_3
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ const R (a i) (h i) (PrimeSpectrum.basicOpen (h i ^ (N + 1))) ?refine_3.hv =
    const R ((fun i => a i * h i ^ N) i) ((fun i => h i ^ (N + 1)) i)
      (PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i)) ⋯

case refine_3.hv
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ ∀ x ∈ PrimeSpectrum.basicOpen (h i ^ (N + 1)), h i ∈ x.asIdeal.primeCompl

tactic: swap
state_before: case refine_3
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ const R (a i) (h i) (PrimeSpectrum.basicOpen (h i ^ (N + 1))) ?refine_3.hv =
    const R ((fun i => a i * h i ^ N) i) ((fun i => h i ^ (N + 1)) i)
      (PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i)) ⋯

case refine_3.hv
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ ∀ x ∈ PrimeSpectrum.basicOpen (h i ^ (N + 1)), h i ∈ x.asIdeal.primeCompl
state_after: case refine_3.hv
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ ∀ x ∈ PrimeSpectrum.basicOpen (h i ^ (N + 1)), h i ∈ x.asIdeal.primeCompl

case refine_3
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ const R (a i) (h i) (PrimeSpectrum.basicOpen (h i ^ (N + 1))) ?refine_3.hv =
    const R ((fun i => a i * h i ^ N) i) ((fun i => h i ^ (N + 1)) i)
      (PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i)) ⋯

tactic: apply const_ext
state_before: case refine_3
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ const R (a i) (h i) (PrimeSpectrum.basicOpen (h i ^ (N + 1))) ⋯ =
    const R ((fun i => a i * h i ^ N) i) ((fun i => h i ^ (N + 1)) i)
      (PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i)) ⋯
state_after: case refine_3.h
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ a i * (fun i => h i ^ (N + 1)) i = (fun i => a i * h i ^ N) i * h i

tactic: dsimp
state_before: case refine_3.h
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ a i * (fun i => h i ^ (N + 1)) i = (fun i => a i * h i ^ N) i * h i
state_after: case refine_3.h
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ a i * h i ^ (N + 1) = a i * h i ^ N * h i

tactic: rw [pow_succ]
state_before: case refine_3.h
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ a i * h i ^ (N + 1) = a i * h i ^ N * h i
state_after: case refine_3.h
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ a i * (h i ^ N * h i) = a i * h i ^ N * h i

tactic: ring
state_before: case refine_3.h
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ a i * (h i ^ N * h i) = a i * h i ^ N * h i
state_after: no goals

tactic: intro i j
state_before: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
⊢ ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
state_after: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
⊢ IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
    IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩

tactic: let D := PrimeSpectrum.basicOpen (h i * h j)
state_before: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
⊢ IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
    IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
state_after: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
⊢ IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
    IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩

tactic: let iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE (PrimeSpectrum.basicOpen_mul_le_left _ _)
state_before: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
⊢ IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
    IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
state_after: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
⊢ IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
    IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩

tactic: let iDj : D ⟶ PrimeSpectrum.basicOpen (h j) :=
  homOfLE (PrimeSpectrum.basicOpen_mul_le_right _ _)
state_before: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
⊢ IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
    IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
state_after: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
    IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩

tactic: apply toBasicOpen_injective R (h i * h j)
state_before: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
    IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
state_after: case a
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ (toBasicOpen R (h i * h j)) (IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩) =
    (toBasicOpen R (h i * h j)) (IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩)

tactic: rw [toBasicOpen_mk', toBasicOpen_mk']
state_before: case a
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ (toBasicOpen R (h i * h j)) (IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩) =
    (toBasicOpen R (h i * h j)) (IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩)
state_after: case a
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ const R (a i * h j) (↑⟨h i * h j, ⋯⟩) (PrimeSpectrum.basicOpen (h i * h j)) ⋯ =
    const R (h i * a j) (↑⟨h i * h j, ⋯⟩) (PrimeSpectrum.basicOpen (h i * h j)) ⋯

tactic: simp only []
state_before: case a
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ const R (a i * h j) (↑⟨h i * h j, ⋯⟩) (PrimeSpectrum.basicOpen (h i * h j)) ⋯ =
    const R (h i * a j) (↑⟨h i * h j, ⋯⟩) (PrimeSpectrum.basicOpen (h i * h j)) ⋯
state_after: case a
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ const R (a i * h j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j)) ⋯ =
    const R (h i * a j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j)) ⋯

tactic: trans
state_before: case a
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ const R (a i * h j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j)) ⋯ =
    const R (h i * a j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j)) ⋯
state_after: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ const R (a i * h j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j)) ⋯ = ?m.162036

R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ ?m.162036 = const R (h i * a j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j)) ⋯

R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ ↑((structureSheaf R).val.obj { unop := PrimeSpectrum.basicOpen (h i * h j) })

tactic: on_goal 1 =>
  convert congr_arg ((structureSheaf R).1.map iDj.op) (hs j).symm using 1
  convert congr_arg ((structureSheaf R).1.map iDi.op) (hs i) using 1
state_before: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ const R (a i * h j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j)) ⋯ = ?m.162036

R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ ?m.162036 = const R (h i * a j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j)) ⋯

R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ ↑((structureSheaf R).val.obj { unop := PrimeSpectrum.basicOpen (h i * h j) })
state_after: case h.e'_2
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ const R (a i * h j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j)) ⋯ =
    ((structureSheaf R).val.map iDi.op) (const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯)

R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ ((structureSheaf R).val.map iDj.op) (const R (a j) (h j) (PrimeSpectrum.basicOpen (h j)) ⋯) =
    const R (h i * a j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j)) ⋯

tactic: all_goals rw [res_const]; apply const_ext; ring
state_before: case h.e'_2
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ const R (a i * h j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j)) ⋯ =
    ((structureSheaf R).val.map iDi.op) (const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯)

R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ ((structureSheaf R).val.map iDj.op) (const R (a j) (h j) (PrimeSpectrum.basicOpen (h j)) ⋯) =
    const R (h i * a j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j)) ⋯
state_after: case h.e'_2.hv
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ ∀ x ∈ D, h i ∈ x.asIdeal.primeCompl

case hv
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ ∀ x ∈ D, h j ∈ x.asIdeal.primeCompl

tactic: exacts [PrimeSpectrum.basicOpen_mul_le_left _ _, PrimeSpectrum.basicOpen_mul_le_right _ _]
state_before: case h.e'_2.hv
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ ∀ x ∈ D, h i ∈ x.asIdeal.primeCompl

case hv
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ ∀ x ∈ D, h j ∈ x.asIdeal.primeCompl
state_after: no goals

tactic: convert congr_arg ((structureSheaf R).1.map iDj.op) (hs j).symm using 1
state_before: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ const R (a i * h j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j)) ⋯ = ?m.162036
state_after: case h.e'_2
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ const R (a i * h j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j)) ⋯ =
    ((structureSheaf R).val.map iDj.op) (((structureSheaf R).val.map (iDh j).op) s)

tactic: convert congr_arg ((structureSheaf R).1.map iDi.op) (hs i) using 1
state_before: case h.e'_2
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ const R (a i * h j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j)) ⋯ =
    ((structureSheaf R).val.map iDj.op) (((structureSheaf R).val.map (iDh j).op) s)
state_after: case h.e'_2
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ const R (a i * h j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j)) ⋯ =
    ((structureSheaf R).val.map iDi.op) (const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯)

tactic: rw [res_const]
state_before: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ ((structureSheaf R).val.map iDj.op) (const R (a j) (h j) (PrimeSpectrum.basicOpen (h j)) ⋯) =
    const R (h i * a j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j)) ⋯
state_after: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ const R (a j) (h j) D ?hv = const R (h i * a j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j)) ⋯

case hv
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ ∀ x ∈ D, h j ∈ x.asIdeal.primeCompl

tactic: apply const_ext
state_before: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ const R (a j) (h j) D ?hv = const R (h i * a j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j)) ⋯

case hv
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ ∀ x ∈ D, h j ∈ x.asIdeal.primeCompl
state_after: case h
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ a j * (h i * h j) = h i * a j * h j

case hv
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ ∀ x ∈ D, h j ∈ x.asIdeal.primeCompl

tactic: ring
state_before: case h
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ a j * (h i * h j) = h i * a j * h j

case hv
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ ∀ x ∈ D, h j ∈ x.asIdeal.primeCompl
state_after: case hv
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE ⋯
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) := homOfLE ⋯
⊢ ∀ x ∈ D, h j ∈ x.asIdeal.primeCompl

tactic: intro i j
state_before: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
⊢ ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
state_after: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
i j : ι
⊢ ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n

tactic: obtain ⟨⟨c, n, rfl⟩, hc⟩ := IsLocalization.eq.mp (fractions_eq i j)
state_before: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
i j : ι
⊢ ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
state_after: case intro.mk.intro
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
i j : ι
n : ℕ
hc :
  ↑⟨(fun x => (h i * h j) ^ x) n, ⋯⟩ * (↑⟨h i * h j, ⋯⟩ * (a i * h j)) =
    ↑⟨(fun x => (h i * h j) ^ x) n, ⋯⟩ * (↑⟨h i * h j, ⋯⟩ * (h i * a j))
⊢ ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n

tactic: use n + 1
state_before: case intro.mk.intro
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
i j : ι
n : ℕ
hc :
  ↑⟨(fun x => (h i * h j) ^ x) n, ⋯⟩ * (↑⟨h i * h j, ⋯⟩ * (a i * h j)) =
    ↑⟨(fun x => (h i * h j) ^ x) n, ⋯⟩ * (↑⟨h i * h j, ⋯⟩ * (h i * a j))
⊢ ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
state_after: case h
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
i j : ι
n : ℕ
hc :
  ↑⟨(fun x => (h i * h j) ^ x) n, ⋯⟩ * (↑⟨h i * h j, ⋯⟩ * (a i * h j)) =
    ↑⟨(fun x => (h i * h j) ^ x) n, ⋯⟩ * (↑⟨h i * h j, ⋯⟩ * (h i * a j))
⊢ a i * h j * (h i * h j) ^ (n + 1) = h i * a j * (h i * h j) ^ (n + 1)

tactic: rw [pow_succ]
state_before: case h
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
i j : ι
n : ℕ
hc :
  ↑⟨(fun x => (h i * h j) ^ x) n, ⋯⟩ * (↑⟨h i * h j, ⋯⟩ * (a i * h j)) =
    ↑⟨(fun x => (h i * h j) ^ x) n, ⋯⟩ * (↑⟨h i * h j, ⋯⟩ * (h i * a j))
⊢ a i * h j * (h i * h j) ^ (n + 1) = h i * a j * (h i * h j) ^ (n + 1)
state_after: case h
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
i j : ι
n : ℕ
hc :
  ↑⟨(fun x => (h i * h j) ^ x) n, ⋯⟩ * (↑⟨h i * h j, ⋯⟩ * (a i * h j)) =
    ↑⟨(fun x => (h i * h j) ^ x) n, ⋯⟩ * (↑⟨h i * h j, ⋯⟩ * (h i * a j))
⊢ a i * h j * ((h i * h j) ^ n * (h i * h j)) = h i * a j * ((h i * h j) ^ n * (h i * h j))

tactic: dsimp at hc
state_before: case h
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
i j : ι
n : ℕ
hc :
  ↑⟨(fun x => (h i * h j) ^ x) n, ⋯⟩ * (↑⟨h i * h j, ⋯⟩ * (a i * h j)) =
    ↑⟨(fun x => (h i * h j) ^ x) n, ⋯⟩ * (↑⟨h i * h j, ⋯⟩ * (h i * a j))
⊢ a i * h j * ((h i * h j) ^ n * (h i * h j)) = h i * a j * ((h i * h j) ^ n * (h i * h j))
state_after: case h
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
i j : ι
n : ℕ
hc : (h i * h j) ^ n * (h i * h j * (a i * h j)) = (h i * h j) ^ n * (h i * h j * (h i * a j))
⊢ a i * h j * ((h i * h j) ^ n * (h i * h j)) = h i * a j * ((h i * h j) ^ n * (h i * h j))

tactic: convert hc using 1 <;> ring
state_before: case h
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
i j : ι
n : ℕ
hc : (h i * h j) ^ n * (h i * h j * (a i * h j)) = (h i * h j) ^ n * (h i * h j * (h i * a j))
⊢ a i * h j * ((h i * h j) ^ n * (h i * h j)) = h i * a j * ((h i * h j) ^ n * (h i * h j))
state_after: no goals

tactic: omega
state_before: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
i : ι
⊢ 0 < N + 1
state_after: no goals

tactic: simpa only [basic_opens_eq] using h_cover
state_before: case refine_1
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
⊢ U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i)
state_after: no goals

tactic: intro i hi j hj
state_before: case refine_2
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
⊢ ∀ i ∈ t,
    ∀ j ∈ t,
      (fun i => a i * h i ^ N) i * (fun i => h i ^ (N + 1)) j = (fun i => h i ^ (N + 1)) i * (fun i => a i * h i ^ N) j
state_after: case refine_2
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
hi : i ∈ t
j : ι
hj : j ∈ t
⊢ (fun i => a i * h i ^ N) i * (fun i => h i ^ (N + 1)) j = (fun i => h i ^ (N + 1)) i * (fun i => a i * h i ^ N) j

tactic: have n_le_N : n (i, j) ≤ N := Finset.le_sup (Finset.mem_product.mpr ⟨hi, hj⟩)
state_before: case refine_2
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
hi : i ∈ t
j : ι
hj : j ∈ t
⊢ (fun i => a i * h i ^ N) i * (fun i => h i ^ (N + 1)) j = (fun i => h i ^ (N + 1)) i * (fun i => a i * h i ^ N) j
state_after: case refine_2
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
hi : i ∈ t
j : ι
hj : j ∈ t
n_le_N : n (i, j) ≤ N
⊢ (fun i => a i * h i ^ N) i * (fun i => h i ^ (N + 1)) j = (fun i => h i ^ (N + 1)) i * (fun i => a i * h i ^ N) j

tactic: cases' Nat.le.dest n_le_N with k hk
state_before: case refine_2
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
hi : i ∈ t
j : ι
hj : j ∈ t
n_le_N : n (i, j) ≤ N
⊢ (fun i => a i * h i ^ N) i * (fun i => h i ^ (N + 1)) j = (fun i => h i ^ (N + 1)) i * (fun i => a i * h i ^ N) j
state_after: case refine_2.intro
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
hi : i ∈ t
j : ι
hj : j ∈ t
n_le_N : n (i, j) ≤ N
k : ℕ
hk : n (i, j) + k = N
⊢ (fun i => a i * h i ^ N) i * (fun i => h i ^ (N + 1)) j = (fun i => h i ^ (N + 1)) i * (fun i => a i * h i ^ N) j

tactic: simp only [← hk, pow_add, pow_one]
state_before: case refine_2.intro
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
hi : i ∈ t
j : ι
hj : j ∈ t
n_le_N : n (i, j) ≤ N
k : ℕ
hk : n (i, j) + k = N
⊢ (fun i => a i * h i ^ N) i * (fun i => h i ^ (N + 1)) j = (fun i => h i ^ (N + 1)) i * (fun i => a i * h i ^ N) j
state_after: case refine_2.intro
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
hi : i ∈ t
j : ι
hj : j ∈ t
n_le_N : n (i, j) ≤ N
k : ℕ
hk : n (i, j) + k = N
⊢ a i * (h i ^ n (i, j) * h i ^ k) * (h j ^ n (i, j) * h j ^ k * h j) =
    h i ^ n (i, j) * h i ^ k * h i * (a j * (h j ^ n (i, j) * h j ^ k))

tactic: simp only [n, mul_pow]
state_before: case h.e'_3
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
hi : i ∈ t
j : ι
hj : j ∈ t
n_le_N : n (i, j) ≤ N
k : ℕ
hk : n (i, j) + k = N
⊢ h i ^ n (i, j) * h i ^ k * h i * (a j * (h j ^ n (i, j) * h j ^ k)) =
    h (i, j).1 * a (i, j).2 * (h (i, j).1 * h (i, j).2) ^ ⋯.choose * (h i * h j) ^ k
state_after: case h.e'_3
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
hi : i ∈ t
j : ι
hj : j ∈ t
n_le_N : n (i, j) ≤ N
k : ℕ
hk : n (i, j) + k = N
⊢ h i ^ ⋯.choose * h i ^ k * h i * (a j * (h j ^ ⋯.choose * h j ^ k)) =
    h i * a j * (h i ^ ⋯.choose * h j ^ ⋯.choose) * (h i ^ k * h j ^ k)

tactic: ring
state_before: case h.e'_3
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
hi : i ∈ t
j : ι
hj : j ∈ t
n_le_N : n (i, j) ≤ N
k : ℕ
hk : n (i, j) + k = N
⊢ h i ^ ⋯.choose * h i ^ k * h i * (a j * (h j ^ ⋯.choose * h j ^ k)) =
    h i * a j * (h i ^ ⋯.choose * h j ^ ⋯.choose) * (h i ^ k * h j ^ k)
state_after: no goals

tactic: exact (basic_opens_eq i).le
state_before: case refine_3.hv
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj { unop := U })
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ i ∈ t, PrimeSpectrum.basicOpen (h i)
hs : ∀ (i : ι), const R (a i) (h i) (PrimeSpectrum.basicOpen (h i)) ⋯ = ((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, ⋯⟩ =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j) ⟨h i * h j, ⋯⟩
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ := fun p => ⋯.choose
n_spec : ∀ (p : ι × ι), a p.1 * h p.2 * (h p.1 * h p.2) ^ ⋯.choose = h p.1 * a p.2 * (h p.1 * h p.2) ^ ⋯.choose
N : ℕ := (t ×ˢ t).sup n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ ∀ x ∈ PrimeSpectrum.basicOpen (h i ^ (N + 1)), h i ∈ x.asIdeal.primeCompl
state_after: no goals