Theorem: Ideal.isCoprime_biInf
File: Mathlib/RingTheory/Ideal/Operations.lean

tactic: classical
simp_rw [isCoprime_iff_add] at *
induction s using Finset.induction with
| empty =>
    simp
| @insert i s _ hs =>
    rw [Finset.iInf_insert, inf_comm, one_eq_top, eq_top_iff, ← one_eq_top]
    set K := ⨅ j ∈ s, J j
    calc
      1 = I + K            := (hs fun j hj ↦ hf j (Finset.mem_insert_of_mem hj)).symm
      _ = I + K*(I + J i)  := by rw [hf i (Finset.mem_insert_self i s), mul_one]
      _ = (1+K)*I + K*J i  := by ring
      _ ≤ I + K ⊓ J i      := add_le_add mul_le_left mul_le_inf
state_before: R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J✝ K L : Ideal R
J : ι → Ideal R
s : Finset ι
hf : ∀ j ∈ s, IsCoprime I (J j)
⊢ IsCoprime I (⨅ j ∈ s, J j)
state_after: no goals

tactic: simp_rw [isCoprime_iff_add] at *
state_before: R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J✝ K L : Ideal R
J : ι → Ideal R
s : Finset ι
hf : ∀ j ∈ s, IsCoprime I (J j)
⊢ IsCoprime I (⨅ j ∈ s, J j)
state_after: R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J✝ K L : Ideal R
J : ι → Ideal R
s : Finset ι
hf : ∀ j ∈ s, I + J j = 1
⊢ I + ⨅ j ∈ s, J j = 1

tactic: induction s using Finset.induction with
| empty =>
    simp
| @insert i s _ hs =>
    rw [Finset.iInf_insert, inf_comm, one_eq_top, eq_top_iff, ← one_eq_top]
    set K := ⨅ j ∈ s, J j
    calc
      1 = I + K            := (hs fun j hj ↦ hf j (Finset.mem_insert_of_mem hj)).symm
      _ = I + K*(I + J i)  := by rw [hf i (Finset.mem_insert_self i s), mul_one]
      _ = (1+K)*I + K*J i  := by ring
      _ ≤ I + K ⊓ J i      := add_le_add mul_le_left mul_le_inf
state_before: R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J✝ K L : Ideal R
J : ι → Ideal R
s : Finset ι
hf : ∀ j ∈ s, I + J j = 1
⊢ I + ⨅ j ∈ s, J j = 1
state_after: no goals

tactic: simp
state_before: case empty
R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J✝ K L : Ideal R
J : ι → Ideal R
hf : ∀ j ∈ ∅, I + J j = 1
⊢ I + ⨅ j ∈ ∅, J j = 1
state_after: no goals

tactic: rw [Finset.iInf_insert, inf_comm, one_eq_top, eq_top_iff, ← one_eq_top]
state_before: case insert
R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J✝ K L : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hs : (∀ j ∈ s, I + J j = 1) → I + ⨅ j ∈ s, J j = 1
hf : ∀ j ∈ insert i s, I + J j = 1
⊢ I + ⨅ j ∈ insert i s, J j = 1
state_after: case insert
R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J✝ K L : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hs : (∀ j ∈ s, I + J j = 1) → I + ⨅ j ∈ s, J j = 1
hf : ∀ j ∈ insert i s, I + J j = 1
⊢ 1 ≤ I + (⨅ x ∈ s, J x) ⊓ J i

tactic: set K := ⨅ j ∈ s, J j
state_before: case insert
R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J✝ K L : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hs : (∀ j ∈ s, I + J j = 1) → I + ⨅ j ∈ s, J j = 1
hf : ∀ j ∈ insert i s, I + J j = 1
⊢ 1 ≤ I + (⨅ x ∈ s, J x) ⊓ J i
state_after: case insert
R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J✝ K✝ L : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hf : ∀ j ∈ insert i s, I + J j = 1
K : Ideal R := ⨅ j ∈ s, J j
hs : (∀ j ∈ s, I + J j = 1) → I + K = 1
⊢ 1 ≤ I + K ⊓ J i

tactic: calc
  1 = I + K            := (hs fun j hj ↦ hf j (Finset.mem_insert_of_mem hj)).symm
  _ = I + K*(I + J i)  := by rw [hf i (Finset.mem_insert_self i s), mul_one]
  _ = (1+K)*I + K*J i  := by ring
  _ ≤ I + K ⊓ J i      := add_le_add mul_le_left mul_le_inf
state_before: case insert
R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J✝ K✝ L : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hf : ∀ j ∈ insert i s, I + J j = 1
K : Ideal R := ⨅ j ∈ s, J j
hs : (∀ j ∈ s, I + J j = 1) → I + K = 1
⊢ 1 ≤ I + K ⊓ J i
state_after: no goals

tactic: rw [hf i (Finset.mem_insert_self i s), mul_one]
state_before: R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J✝ K✝ L : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hf : ∀ j ∈ insert i s, I + J j = 1
K : Ideal R := ⨅ j ∈ s, J j
hs : (∀ j ∈ s, I + J j = 1) → I + K = 1
⊢ I + K = I + K * (I + J i)
state_after: no goals

tactic: ring
state_before: R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J✝ K✝ L : Ideal R
J : ι → Ideal R
i : ι
s : Finset ι
a✝ : i ∉ s
hf : ∀ j ∈ insert i s, I + J j = 1
K : Ideal R := ⨅ j ∈ s, J j
hs : (∀ j ∈ s, I + J j = 1) → I + K = 1
⊢ I + K * (I + J i) = (1 + K) * I + K * J i
state_after: no goals