l3lab/ntp-mathlib huggingface dataset:
theorem of.zero_exact_aux2 {x : FreeCommRing (Σi, G i)} {s t} (hxs : IsSupported x s) {j k}
    (hj : ∀ z : Σi, G i, z ∈ s → z.1 ≤ j) (hk : ∀ z : Σi, G i, z ∈ t → z.1 ≤ k) (hjk : j ≤ k)
    (hst : s ⊆ t) :
    f' j k hjk (lift (fun ix : s => f' ix.1.1 j (hj ix ix.2) ix.1.2) (restriction s x)) =
      lift (fun ix : t => f' ix.1.1 k (hk ix ix.2) ix.1.2) (restriction t x) := by
  refine' Subring.InClosure.recOn hxs _ _ _ _
  · rw [(restriction _).map_one, (FreeCommRing.lift _).map_one, (f' j k hjk).map_one,
      (restriction _).map_one, (FreeCommRing.lift _).map_one]
  · -- porting note: Lean 3 had `(FreeCommRing.lift _).map_neg` but I needed to replace it with
  -- `RingHom.map_neg` to get the rewrite to compile
    rw [(restriction _).map_neg, (restriction _).map_one, RingHom.map_neg,
      (FreeCommRing.lift _).map_one, (f' j k hjk).map_neg, (f' j k hjk).map_one,
      -- porting note: similarly here I give strictly less information
      (restriction _).map_neg, (restriction _).map_one, RingHom.map_neg,
      (FreeCommRing.lift _).map_one]
  · rintro _ ⟨p, hps, rfl⟩ n ih
    

Proof state:
case refine'_3.intro.intro
R : Type u
inst✝³ : Ring R
ι : Type v
dec_ι : DecidableEq ι
inst✝² : Preorder ι
G : ι → Type w
inst✝¹ : (i : ι) → CommRing (G i)
f : (i j : ι) → i ≤ j → G i → G j
f' : (i j : ι) → i ≤ j → G i →+* G j
inst✝ : DirectedSystem G fun i j h => ⇑(f' i j h)
x : FreeCommRing ((i : ι) × G i)
s t : Set ((i : ι) × G i)
hxs : IsSupported x s
j k : ι
hj : ∀ z ∈ s, z.fst ≤ j
hk : ∀ z ∈ t, z.fst ≤ k
hjk : j ≤ k
hst : s ⊆ t
p : (i : ι) × G i
hps : p ∈ s
n : FreeCommRing ((i : ι) × G i)
ih :
  (f' j k hjk) ((lift fun ix => (f' (↑ix).fst j (_ : (↑ix).fst ≤ j)) (↑ix).snd) ((restriction s) n)) =
    (lift fun ix => (f' (↑ix).fst k (_ : (↑ix).fst ≤ k)) (↑ix).snd) ((restriction t) n)
⊢ (f' j k hjk)
      ((lift fun ix => (f' (↑ix).fst j (_ : (↑ix).fst ≤ j)) (↑ix).snd) ((restriction s) (FreeCommRing.of p * n))) =
    (lift fun ix => (f' (↑ix).fst k (_ : (↑ix).fst ≤ k)) (↑ix).snd) ((restriction t) (FreeCommRing.of p * n))

Next tactic:
rw [(restriction _).map_mul, (FreeCommRing.lift _).map_mul, (f' j k hjk).map_mul, ih,
      (restriction _).map_mul, (FreeCommRing.lift _).map_mul, restriction_of, dif_pos hps, lift_of,
      restriction_of, dif_pos (hst hps), lift_of]
theorem of.zero_exact_aux2 {x : FreeCommRing (Σi, G i)} {s t} (hxs : IsSupported x s) {j k}
    (hj : ∀ z : Σi, G i, z ∈ s → z.1 ≤ j) (hk : ∀ z : Σi, G i, z ∈ t → z.1 ≤ k) (hjk : j ≤ k)
    (hst : s ⊆ t) :
    f' j k hjk (lift (fun ix : s => f' ix.1.1 j (hj ix ix.2) ix.1.2) (restriction s x)) =
      lift (fun ix : t => f' ix.1.1 k (hk ix ix.2) ix.1.2) (restriction t x) := by
  refine' Subring.InClosure.recOn hxs _ _ _ _
  · rw [(restriction _).map_one, (FreeCommRing.lift _).map_one, (f' j k hjk).map_one,
      (restriction _).map_one, (FreeCommRing.lift _).map_one]
  · -- porting note: Lean 3 had `(FreeCommRing.lift _).map_neg` but I needed to replace it with
  -- `RingHom.map_neg` to get the rewrite to compile
    rw [(restriction _).map_neg, (restriction _).map_one, RingHom.map_neg,
      (FreeCommRing.lift _).map_one, (f' j k hjk).map_neg, (f' j k hjk).map_one,
      -- porting note: similarly here I give strictly less information
      (restriction _).map_neg, (restriction _).map_one, RingHom.map_neg,
      (FreeCommRing.lift _).map_one]
  · rintro _ ⟨p, hps, rfl⟩ n ih
    rw [(restriction _).map_mul, (FreeCommRing.lift _).map_mul, (f' j k hjk).map_mul, ih,
      (restriction _).map_mul, (FreeCommRing.lift _).map_mul, restriction_of, dif_pos hps, lift_of,
      restriction_of, dif_pos (hst hps), lift_of]
    

Proof state:
case refine'_3.intro.intro
R : Type u
inst✝³ : Ring R
ι : Type v
dec_ι : DecidableEq ι
inst✝² : Preorder ι
G : ι → Type w
inst✝¹ : (i : ι) → CommRing (G i)
f : (i j : ι) → i ≤ j → G i → G j
f' : (i j : ι) → i ≤ j → G i →+* G j
inst✝ : DirectedSystem G fun i j h => ⇑(f' i j h)
x : FreeCommRing ((i : ι) × G i)
s t : Set ((i : ι) × G i)
hxs : IsSupported x s
j k : ι
hj : ∀ z ∈ s, z.fst ≤ j
hk : ∀ z ∈ t, z.fst ≤ k
hjk : j ≤ k
hst : s ⊆ t
p : (i : ι) × G i
hps : p ∈ s
n : FreeCommRing ((i : ι) × G i)
ih :
  (f' j k hjk) ((lift fun ix => (f' (↑ix).fst j (_ : (↑ix).fst ≤ j)) (↑ix).snd) ((restriction s) n)) =
    (lift fun ix => (f' (↑ix).fst k (_ : (↑ix).fst ≤ k)) (↑ix).snd) ((restriction t) n)
⊢ (f' j k hjk)
        ((f' (↑{ val := p, property := hps }).fst j (_ : (↑{ val := p, property := hps }).fst ≤ j))
          (↑{ val := p, property := hps }).snd) *
      (lift fun ix => (f' (↑ix).fst k (_ : (↑ix).fst ≤ k)) (↑ix).snd) ((restriction t) n) =
    (f' (↑{ val := p, property := (_ : p ∈ t) }).fst k (_ : (↑{ val := p, property := (_ : p ∈ t) }).fst ≤ k))
        (↑{ val := p, property := (_ : p ∈ t) }).snd *
      (lift fun ix => (f' (↑ix).fst k (_ : (↑ix).fst ≤ k)) (↑ix).snd) ((restriction t) n)

Next tactic:
dsimp only
theorem of.zero_exact_aux2 {x : FreeCommRing (Σi, G i)} {s t} (hxs : IsSupported x s) {j k}
    (hj : ∀ z : Σi, G i, z ∈ s → z.1 ≤ j) (hk : ∀ z : Σi, G i, z ∈ t → z.1 ≤ k) (hjk : j ≤ k)
    (hst : s ⊆ t) :
    f' j k hjk (lift (fun ix : s => f' ix.1.1 j (hj ix ix.2) ix.1.2) (restriction s x)) =
      lift (fun ix : t => f' ix.1.1 k (hk ix ix.2) ix.1.2) (restriction t x) := by
  refine' Subring.InClosure.recOn hxs _ _ _ _
  · rw [(restriction _).map_one, (FreeCommRing.lift _).map_one, (f' j k hjk).map_one,
      (restriction _).map_one, (FreeCommRing.lift _).map_one]
  · -- porting note: Lean 3 had `(FreeCommRing.lift _).map_neg` but I needed to replace it with
  -- `RingHom.map_neg` to get the rewrite to compile
    rw [(restriction _).map_neg, (restriction _).map_one, RingHom.map_neg,
      (FreeCommRing.lift _).map_one, (f' j k hjk).map_neg, (f' j k hjk).map_one,
      -- porting note: similarly here I give strictly less information
      (restriction _).map_neg, (restriction _).map_one, RingHom.map_neg,
      (FreeCommRing.lift _).map_one]
  · rintro _ ⟨p, hps, rfl⟩ n ih
    rw [(restriction _).map_mul, (FreeCommRing.lift _).map_mul, (f' j k hjk).map_mul, ih,
      (restriction _).map_mul, (FreeCommRing.lift _).map_mul, restriction_of, dif_pos hps, lift_of,
      restriction_of, dif_pos (hst hps), lift_of]
    dsimp only
    -- porting note: Lean 3 could get away with far fewer hints for inputs in the line below
    

Proof state:
case refine'_3.intro.intro
R : Type u
inst✝³ : Ring R
ι : Type v
dec_ι : DecidableEq ι
inst✝² : Preorder ι
G : ι → Type w
inst✝¹ : (i : ι) → CommRing (G i)
f : (i j : ι) → i ≤ j → G i → G j
f' : (i j : ι) → i ≤ j → G i →+* G j
inst✝ : DirectedSystem G fun i j h => ⇑(f' i j h)
x : FreeCommRing ((i : ι) × G i)
s t : Set ((i : ι) × G i)
hxs : IsSupported x s
j k : ι
hj : ∀ z ∈ s, z.fst ≤ j
hk : ∀ z ∈ t, z.fst ≤ k
hjk : j ≤ k
hst : s ⊆ t
p : (i : ι) × G i
hps : p ∈ s
n : FreeCommRing ((i : ι) × G i)
ih :
  (f' j k hjk) ((lift fun ix => (f' (↑ix).fst j (_ : (↑ix).fst ≤ j)) (↑ix).snd) ((restriction s) n)) =
    (lift fun ix => (f' (↑ix).fst k (_ : (↑ix).fst ≤ k)) (↑ix).snd) ((restriction t) n)
⊢ (f' j k hjk) ((f' p.fst j (_ : p.fst ≤ j)) p.snd) *
      (lift fun ix => (f' (↑ix).fst k (_ : (↑ix).fst ≤ k)) (↑ix).snd) ((restriction t) n) =
    (f' p.fst k (_ : p.fst ≤ k)) p.snd *
      (lift fun ix => (f' (↑ix).fst k (_ : (↑ix).fst ≤ k)) (↑ix).snd) ((restriction t) n)

Next tactic:
have := DirectedSystem.map_map (fun i j h => f' i j h) (hj p hps) hjk
theorem of.zero_exact_aux2 {x : FreeCommRing (Σi, G i)} {s t} (hxs : IsSupported x s) {j k}
    (hj : ∀ z : Σi, G i, z ∈ s → z.1 ≤ j) (hk : ∀ z : Σi, G i, z ∈ t → z.1 ≤ k) (hjk : j ≤ k)
    (hst : s ⊆ t) :
    f' j k hjk (lift (fun ix : s => f' ix.1.1 j (hj ix ix.2) ix.1.2) (restriction s x)) =
      lift (fun ix : t => f' ix.1.1 k (hk ix ix.2) ix.1.2) (restriction t x) := by
  refine' Subring.InClosure.recOn hxs _ _ _ _
  · rw [(restriction _).map_one, (FreeCommRing.lift _).map_one, (f' j k hjk).map_one,
      (restriction _).map_one, (FreeCommRing.lift _).map_one]
  · -- porting note: Lean 3 had `(FreeCommRing.lift _).map_neg` but I needed to replace it with
  -- `RingHom.map_neg` to get the rewrite to compile
    rw [(restriction _).map_neg, (restriction _).map_one, RingHom.map_neg,
      (FreeCommRing.lift _).map_one, (f' j k hjk).map_neg, (f' j k hjk).map_one,
      -- porting note: similarly here I give strictly less information
      (restriction _).map_neg, (restriction _).map_one, RingHom.map_neg,
      (FreeCommRing.lift _).map_one]
  · rintro _ ⟨p, hps, rfl⟩ n ih
    rw [(restriction _).map_mul, (FreeCommRing.lift _).map_mul, (f' j k hjk).map_mul, ih,
      (restriction _).map_mul, (FreeCommRing.lift _).map_mul, restriction_of, dif_pos hps, lift_of,
      restriction_of, dif_pos (hst hps), lift_of]
    dsimp only
    -- porting note: Lean 3 could get away with far fewer hints for inputs in the line below
    have := DirectedSystem.map_map (fun i j h => f' i j h) (hj p hps) hjk
    

Proof state:
case refine'_3.intro.intro
R : Type u
inst✝³ : Ring R
ι : Type v
dec_ι : DecidableEq ι
inst✝² : Preorder ι
G : ι → Type w
inst✝¹ : (i : ι) → CommRing (G i)
f : (i j : ι) → i ≤ j → G i → G j
f' : (i j : ι) → i ≤ j → G i →+* G j
inst✝ : DirectedSystem G fun i j h => ⇑(f' i j h)
x : FreeCommRing ((i : ι) × G i)
s t : Set ((i : ι) × G i)
hxs : IsSupported x s
j k : ι
hj : ∀ z ∈ s, z.fst ≤ j
hk : ∀ z ∈ t, z.fst ≤ k
hjk : j ≤ k
hst : s ⊆ t
p : (i : ι) × G i
hps : p ∈ s
n : FreeCommRing ((i : ι) × G i)
ih :
  (f' j k hjk) ((lift fun ix => (f' (↑ix).fst j (_ : (↑ix).fst ≤ j)) (↑ix).snd) ((restriction s) n)) =
    (lift fun ix => (f' (↑ix).fst k (_ : (↑ix).fst ≤ k)) (↑ix).snd) ((restriction t) n)
this : ∀ (x : G p.fst), (f' j k hjk) ((f' p.fst j (_ : p.fst ≤ j)) x) = (f' p.fst k (_ : p.fst ≤ k)) x
⊢ (f' j k hjk) ((f' p.fst j (_ : p.fst ≤ j)) p.snd) *
      (lift fun ix => (f' (↑ix).fst k (_ : (↑ix).fst ≤ k)) (↑ix).snd) ((restriction t) n) =
    (f' p.fst k (_ : p.fst ≤ k)) p.snd *
      (lift fun ix => (f' (↑ix).fst k (_ : (↑ix).fst ≤ k)) (↑ix).snd) ((restriction t) n)

Next tactic:
rw [this]
theorem of.zero_exact_aux2 {x : FreeCommRing (Σi, G i)} {s t} (hxs : IsSupported x s) {j k}
    (hj : ∀ z : Σi, G i, z ∈ s → z.1 ≤ j) (hk : ∀ z : Σi, G i, z ∈ t → z.1 ≤ k) (hjk : j ≤ k)
    (hst : s ⊆ t) :
    f' j k hjk (lift (fun ix : s => f' ix.1.1 j (hj ix ix.2) ix.1.2) (restriction s x)) =
      lift (fun ix : t => f' ix.1.1 k (hk ix ix.2) ix.1.2) (restriction t x) := by
  refine' Subring.InClosure.recOn hxs _ _ _ _
  · rw [(restriction _).map_one, (FreeCommRing.lift _).map_one, (f' j k hjk).map_one,
      (restriction _).map_one, (FreeCommRing.lift _).map_one]
  · -- porting note: Lean 3 had `(FreeCommRing.lift _).map_neg` but I needed to replace it with
  -- `RingHom.map_neg` to get the rewrite to compile
    rw [(restriction _).map_neg, (restriction _).map_one, RingHom.map_neg,
      (FreeCommRing.lift _).map_one, (f' j k hjk).map_neg, (f' j k hjk).map_one,
      -- porting note: similarly here I give strictly less information
      (restriction _).map_neg, (restriction _).map_one, RingHom.map_neg,
      (FreeCommRing.lift _).map_one]
  · rintro _ ⟨p, hps, rfl⟩ n ih
    rw [(restriction _).map_mul, (FreeCommRing.lift _).map_mul, (f' j k hjk).map_mul, ih,
      (restriction _).map_mul, (FreeCommRing.lift _).map_mul, restriction_of, dif_pos hps, lift_of,
      restriction_of, dif_pos (hst hps), lift_of]
    dsimp only
    -- porting note: Lean 3 could get away with far fewer hints for inputs in the line below
    have := DirectedSystem.map_map (fun i j h => f' i j h) (hj p hps) hjk
    rw [this]
  · 

Proof state:
case refine'_4
R : Type u
inst✝³ : Ring R
ι : Type v
dec_ι : DecidableEq ι
inst✝² : Preorder ι
G : ι → Type w
inst✝¹ : (i : ι) → CommRing (G i)
f : (i j : ι) → i ≤ j → G i → G j
f' : (i j : ι) → i ≤ j → G i →+* G j
inst✝ : DirectedSystem G fun i j h => ⇑(f' i j h)
x : FreeCommRing ((i : ι) × G i)
s t : Set ((i : ι) × G i)
hxs : IsSupported x s
j k : ι
hj : ∀ z ∈ s, z.fst ≤ j
hk : ∀ z ∈ t, z.fst ≤ k
hjk : j ≤ k
hst : s ⊆ t
⊢ ∀ {x y : FreeCommRing ((i : ι) × G i)},
    (f' j k hjk) ((lift fun ix => (f' (↑ix).fst j (_ : (↑ix).fst ≤ j)) (↑ix).snd) ((restriction s) x)) =
        (lift fun ix => (f' (↑ix).fst k (_ : (↑ix).fst ≤ k)) (↑ix).snd) ((restriction t) x) →
      (f' j k hjk) ((lift fun ix => (f' (↑ix).fst j (_ : (↑ix).fst ≤ j)) (↑ix).snd) ((restriction s) y)) =
          (lift fun ix => (f' (↑ix).fst k (_ : (↑ix).fst ≤ k)) (↑ix).snd) ((restriction t) y) →
        (f' j k hjk) ((lift fun ix => (f' (↑ix).fst j (_ : (↑ix).fst ≤ j)) (↑ix).snd) ((restriction s) (x + y))) =
          (lift fun ix => (f' (↑ix).fst k (_ : (↑ix).fst ≤ k)) (↑ix).snd) ((restriction t) (x + y))

Next tactic:
rintro x y ihx ihy
theorem of.zero_exact_aux2 {x : FreeCommRing (Σi, G i)} {s t} (hxs : IsSupported x s) {j k}
    (hj : ∀ z : Σi, G i, z ∈ s → z.1 ≤ j) (hk : ∀ z : Σi, G i, z ∈ t → z.1 ≤ k) (hjk : j ≤ k)
    (hst : s ⊆ t) :
    f' j k hjk (lift (fun ix : s => f' ix.1.1 j (hj ix ix.2) ix.1.2) (restriction s x)) =
      lift (fun ix : t => f' ix.1.1 k (hk ix ix.2) ix.1.2) (restriction t x) := by
  refine' Subring.InClosure.recOn hxs _ _ _ _
  · rw [(restriction _).map_one, (FreeCommRing.lift _).map_one, (f' j k hjk).map_one,
      (restriction _).map_one, (FreeCommRing.lift _).map_one]
  · -- porting note: Lean 3 had `(FreeCommRing.lift _).map_neg` but I needed to replace it with
  -- `RingHom.map_neg` to get the rewrite to compile
    rw [(restriction _).map_neg, (restriction _).map_one, RingHom.map_neg,
      (FreeCommRing.lift _).map_one, (f' j k hjk).map_neg, (f' j k hjk).map_one,
      -- porting note: similarly here I give strictly less information
      (restriction _).map_neg, (restriction _).map_one, RingHom.map_neg,
      (FreeCommRing.lift _).map_one]
  · rintro _ ⟨p, hps, rfl⟩ n ih
    rw [(restriction _).map_mul, (FreeCommRing.lift _).map_mul, (f' j k hjk).map_mul, ih,
      (restriction _).map_mul, (FreeCommRing.lift _).map_mul, restriction_of, dif_pos hps, lift_of,
      restriction_of, dif_pos (hst hps), lift_of]
    dsimp only
    -- porting note: Lean 3 could get away with far fewer hints for inputs in the line below
    have := DirectedSystem.map_map (fun i j h => f' i j h) (hj p hps) hjk
    rw [this]
  · rintro x y ihx ihy
    

Proof state:
case refine'_4
R : Type u
inst✝³ : Ring R
ι : Type v
dec_ι : DecidableEq ι
inst✝² : Preorder ι
G : ι → Type w
inst✝¹ : (i : ι) → CommRing (G i)
f : (i j : ι) → i ≤ j → G i → G j
f' : (i j : ι) → i ≤ j → G i →+* G j
inst✝ : DirectedSystem G fun i j h => ⇑(f' i j h)
x✝ : FreeCommRing ((i : ι) × G i)
s t : Set ((i : ι) × G i)
hxs : IsSupported x✝ s
j k : ι
hj : ∀ z ∈ s, z.fst ≤ j
hk : ∀ z ∈ t, z.fst ≤ k
hjk : j ≤ k
hst : s ⊆ t
x y : FreeCommRing ((i : ι) × G i)
ihx :
  (f' j k hjk) ((lift fun ix => (f' (↑ix).fst j (_ : (↑ix).fst ≤ j)) (↑ix).snd) ((restriction s) x)) =
    (lift fun ix => (f' (↑ix).fst k (_ : (↑ix).fst ≤ k)) (↑ix).snd) ((restriction t) x)
ihy :
  (f' j k hjk) ((lift fun ix => (f' (↑ix).fst j (_ : (↑ix).fst ≤ j)) (↑ix).snd) ((restriction s) y)) =
    (lift fun ix => (f' (↑ix).fst k (_ : (↑ix).fst ≤ k)) (↑ix).snd) ((restriction t) y)
⊢ (f' j k hjk) ((lift fun ix => (f' (↑ix).fst j (_ : (↑ix).fst ≤ j)) (↑ix).snd) ((restriction s) (x + y))) =
    (lift fun ix => (f' (↑ix).fst k (_ : (↑ix).fst ≤ k)) (↑ix).snd) ((restriction t) (x + y))

Next tactic:
rw [(restriction _).map_add, (FreeCommRing.lift _).map_add, (f' j k hjk).map_add, ihx, ihy,
      (restriction _).map_add, (FreeCommRing.lift _).map_add]
theorem of.zero_exact_aux [Nonempty ι] [IsDirected ι (· ≤ ·)] {x : FreeCommRing (Σi, G i)}
    (H : (Ideal.Quotient.mk _ x : DirectLimit G fun i j h => f' i j h)
        = (0 : DirectLimit G fun i j h => f' i j h)) :
    ∃ j s,
      ∃ H : ∀ k : Σi, G i, k ∈ s → k.1 ≤ j,
        IsSupported x s ∧
          lift (fun ix : s => f' ix.1.1 j (H ix ix.2) ix.1.2) (restriction s x) = (0 : G j) := by
  

Proof state:
R : Type u
inst✝⁵ : Ring R
ι : Type v
dec_ι : DecidableEq ι
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → CommRing (G i)
f : (i j : ι) → i ≤ j → G i → G j
f' : (i j : ι) → i ≤ j → G i →+* G j
inst✝² : DirectedSystem G fun i j h => ⇑(f' i j h)
inst✝¹ : Nonempty ι
inst✝ : IsDirected ι fun x x_1 => x ≤ x_1
x : FreeCommRing ((i : ι) × G i)
H :
  (Ideal.Quotient.mk
        (Ideal.span
          {a |
            (∃ i j,
                ∃ (H : i ≤ j),
                  ∃ x,
                    FreeCommRing.of { fst := j, snd := (fun i j h => ⇑(f' i j h)) i j H x } -
                        FreeCommRing.of { fst := i, snd := x } =
                      a) ∨
              (∃ i, FreeCommRing.of { fst := i, snd := 1 } - 1 = a) ∨
                (∃ i x y,
                    FreeCommRing.of { fst := i, snd := x + y } -
                        (FreeCommRing.of { fst := i, snd := x } + FreeCommRing.of { fst := i, snd := y }) =
                      a) ∨
                  ∃ i x y,
                    FreeCommRing.of { fst := i, snd := x * y } -
                        FreeCommRing.of { fst := i, snd := x } * FreeCommRing.of { fst := i, snd := y } =
                      a}))
      x =
    0
⊢ ∃ j s,
    ∃ (H : ∀ k ∈ s, k.fst ≤ j),
      IsSupported x s ∧ (lift fun ix => (f' (↑ix).fst j (_ : (↑ix).fst ≤ j)) (↑ix).snd) ((restriction s) x) = 0

Next tactic:
refine' span_induction (Ideal.Quotient.eq_zero_iff_mem.1 H) _ _ _ _
theorem of.zero_exact_aux [Nonempty ι] [IsDirected ι (· ≤ ·)] {x : FreeCommRing (Σi, G i)}
    (H : (Ideal.Quotient.mk _ x : DirectLimit G fun i j h => f' i j h)
        = (0 : DirectLimit G fun i j h => f' i j h)) :
    ∃ j s,
      ∃ H : ∀ k : Σi, G i, k ∈ s → k.1 ≤ j,
        IsSupported x s ∧
          lift (fun ix : s => f' ix.1.1 j (H ix ix.2) ix.1.2) (restriction s x) = (0 : G j) := by
  refine' span_induction (Ideal.Quotient.eq_zero_iff_mem.1 H) _ _ _ _
  · 

Proof state:
case refine'_1
R : Type u
inst✝⁵ : Ring R
ι : Type v
dec_ι : DecidableEq ι
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → CommRing (G i)
f : (i j : ι) → i ≤ j → G i → G j
f' : (i j : ι) → i ≤ j → G i →+* G j
inst✝² : DirectedSystem G fun i j h => ⇑(f' i j h)
inst✝¹ : Nonempty ι
inst✝ : IsDirected ι fun x x_1 => x ≤ x_1
x : FreeCommRing ((i : ι) × G i)
H :
  (Ideal.Quotient.mk
        (Ideal.span
          {a |
            (∃ i j,
                ∃ (H : i ≤ j),
                  ∃ x,
                    FreeCommRing.of { fst := j, snd := (fun i j h => ⇑(f' i j h)) i j H x } -
                        FreeCommRing.of { fst := i, snd := x } =
                      a) ∨
              (∃ i, FreeCommRing.of { fst := i, snd := 1 } - 1 = a) ∨
                (∃ i x y,
                    FreeCommRing.of { fst := i, snd := x + y } -
                        (FreeCommRing.of { fst := i, snd := x } + FreeCommRing.of { fst := i, snd := y }) =
                      a) ∨
                  ∃ i x y,
                    FreeCommRing.of { fst := i, snd := x * y } -
                        FreeCommRing.of { fst := i, snd := x } * FreeCommRing.of { fst := i, snd := y } =
                      a}))
      x =
    0
⊢ ∀
    x ∈
      {a |
        (∃ i j,
            ∃ (H : i ≤ j),
              ∃ x,
                FreeCommRing.of { fst := j, snd := (fun i j h => ⇑(f' i j h)) i j H x } -
                    FreeCommRing.of { fst := i, snd := x } =
                  a) ∨
          (∃ i, FreeCommRing.of { fst := i, snd := 1 } - 1 = a) ∨
            (∃ i x y,
                FreeCommRing.of { fst := i, snd := x + y } -
                    (FreeCommRing.of { fst := i, snd := x } + FreeCommRing.of { fst := i, snd := y }) =
                  a) ∨
              ∃ i x y,
                FreeCommRing.of { fst := i, snd := x * y } -
                    FreeCommRing.of { fst := i, snd := x } * FreeCommRing.of { fst := i, snd := y } =
                  a},
    ∃ j s,
      ∃ (H : ∀ k ∈ s, k.fst ≤ j),
        IsSupported x s ∧ (lift fun ix => (f' (↑ix).fst j (_ : (↑ix).fst ≤ j)) (↑ix).snd) ((restriction s) x) = 0

Next tactic:
rintro x (⟨i, j, hij, x, rfl⟩ | ⟨i, rfl⟩ | ⟨i, x, y, rfl⟩ | ⟨i, x, y, rfl⟩)
theorem of.zero_exact_aux [Nonempty ι] [IsDirected ι (· ≤ ·)] {x : FreeCommRing (Σi, G i)}
    (H : (Ideal.Quotient.mk _ x : DirectLimit G fun i j h => f' i j h)
        = (0 : DirectLimit G fun i j h => f' i j h)) :
    ∃ j s,
      ∃ H : ∀ k : Σi, G i, k ∈ s → k.1 ≤ j,
        IsSupported x s ∧
          lift (fun ix : s => f' ix.1.1 j (H ix ix.2) ix.1.2) (restriction s x) = (0 : G j) := by
  refine' span_induction (Ideal.Quotient.eq_zero_iff_mem.1 H) _ _ _ _
  · rintro x (⟨i, j, hij, x, rfl⟩ | ⟨i, rfl⟩ | ⟨i, x, y, rfl⟩ | ⟨i, x, y, rfl⟩)
    · 

Proof state:
case refine'_1.inl.intro.intro.intro.intro
R : Type u
inst✝⁵ : Ring R
ι : Type v
dec_ι : DecidableEq ι
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → CommRing (G i)
f : (i j : ι) → i ≤ j → G i → G j
f' : (i j : ι) → i ≤ j → G i →+* G j
inst✝² : DirectedSystem G fun i j h => ⇑(f' i j h)
inst✝¹ : Nonempty ι
inst✝ : IsDirected ι fun x x_1 => x ≤ x_1
x✝ : FreeCommRing ((i : ι) × G i)
H :
  (Ideal.Quotient.mk
        (Ideal.span
          {a |
            (∃ i j,
                ∃ (H : i ≤ j),
                  ∃ x,
                    FreeCommRing.of { fst := j, snd := (fun i j h => ⇑(f' i j h)) i j H x } -
                        FreeCommRing.of { fst := i, snd := x } =
                      a) ∨
              (∃ i, FreeCommRing.of { fst := i, snd := 1 } - 1 = a) ∨
                (∃ i x y,
                    FreeCommRing.of { fst := i, snd := x + y } -
                        (FreeCommRing.of { fst := i, snd := x } + FreeCommRing.of { fst := i, snd := y }) =
                      a) ∨
                  ∃ i x y,
                    FreeCommRing.of { fst := i, snd := x * y } -
                        FreeCommRing.of { fst := i, snd := x } * FreeCommRing.of { fst := i, snd := y } =
                      a}))
      x✝ =
    0
i j : ι
hij : i ≤ j
x : G i
⊢ ∃ j_1 s,
    ∃ (H : ∀ k ∈ s, k.fst ≤ j_1),
      IsSupported
          (FreeCommRing.of { fst := j, snd := (fun i j h => ⇑(f' i j h)) i j hij x } -
            FreeCommRing.of { fst := i, snd := x })
          s ∧
        (lift fun ix => (f' (↑ix).fst j_1 (_ : (↑ix).fst ≤ j_1)) (↑ix).snd)
            ((restriction s)
              (FreeCommRing.of { fst := j, snd := (fun i j h => ⇑(f' i j h)) i j hij x } -
                FreeCommRing.of { fst := i, snd := x })) =
          0

Next tactic:
refine'
        ⟨j, {⟨i, x⟩, ⟨j, f' i j hij x⟩}, _,
          isSupported_sub (isSupported_of.2 <| Or.inr rfl) (isSupported_of.2 <| Or.inl rfl), _⟩