Theorem: Nat.chineseRemainderOfMultiset_lt_prod
File: Mathlib/Data/Nat/ChineseRemainder.lean

tactic: induction' m using Quot.ind with l
state_before: ι : Type u_1
a s : ι → ℕ
m : Multiset ι
nod : m.Nodup
hs : ∀ i ∈ m, s i ≠ 0
pp : {x | x ∈ m}.Pairwise (Coprime on s)
⊢ ↑(chineseRemainderOfMultiset a s nod hs pp) < (Multiset.map s m).prod
state_after: case mk
ι : Type u_1
a s : ι → ℕ
l : List ι
nod : Multiset.Nodup (Quot.mk Setoid.r l)
hs : ∀ i ∈ Quot.mk Setoid.r l, s i ≠ 0
pp : {x | x ∈ Quot.mk Setoid.r l}.Pairwise (Coprime on s)
⊢ ↑(chineseRemainderOfMultiset a s nod hs pp) < (Multiset.map s (Quot.mk Setoid.r l)).prod

tactic: unfold chineseRemainderOfMultiset
state_before: case mk
ι : Type u_1
a s : ι → ℕ
l : List ι
nod : Multiset.Nodup (Quot.mk Setoid.r l)
hs : ∀ i ∈ Quot.mk Setoid.r l, s i ≠ 0
pp : {x | x ∈ Quot.mk Setoid.r l}.Pairwise (Coprime on s)
⊢ ↑(chineseRemainderOfMultiset a s nod hs pp) < (Multiset.map s (Quot.mk Setoid.r l)).prod
state_after: case mk
ι : Type u_1
a s : ι → ℕ
l : List ι
nod : Multiset.Nodup (Quot.mk Setoid.r l)
hs : ∀ i ∈ Quot.mk Setoid.r l, s i ≠ 0
pp : {x | x ∈ Quot.mk Setoid.r l}.Pairwise (Coprime on s)
⊢ ↑(Quotient.recOn (motive := fun x =>
        x.Nodup → (∀ i ∈ x, s i ≠ 0) → {x_1 | x_1 ∈ x}.Pairwise (Coprime on s) → { k // ∀ i ∈ x, k ≡ a i [MOD s i] })
        (Quot.mk Setoid.r l) (fun l nod x co => chineseRemainderOfList a s l ⋯) ⋯ nod hs pp) <
    (Multiset.map s (Quot.mk Setoid.r l)).prod

tactic: simp
state_before: case mk
ι : Type u_1
a s : ι → ℕ
l : List ι
nod : Multiset.Nodup (Quot.mk Setoid.r l)
hs : ∀ i ∈ Quot.mk Setoid.r l, s i ≠ 0
pp : {x | x ∈ Quot.mk Setoid.r l}.Pairwise (Coprime on s)
⊢ ↑(Quotient.recOn (motive := fun x =>
        x.Nodup → (∀ i ∈ x, s i ≠ 0) → {x_1 | x_1 ∈ x}.Pairwise (Coprime on s) → { k // ∀ i ∈ x, k ≡ a i [MOD s i] })
        (Quot.mk Setoid.r l) (fun l nod x co => chineseRemainderOfList a s l ⋯) ⋯ nod hs pp) <
    (Multiset.map s (Quot.mk Setoid.r l)).prod
state_after: case mk
ι : Type u_1
a s : ι → ℕ
l : List ι
nod : Multiset.Nodup (Quot.mk Setoid.r l)
hs : ∀ i ∈ Quot.mk Setoid.r l, s i ≠ 0
pp : {x | x ∈ Quot.mk Setoid.r l}.Pairwise (Coprime on s)
⊢ ↑(Quotient.recOn (motive := fun x =>
        x.Nodup → (∀ i ∈ x, ¬s i = 0) → {x_1 | x_1 ∈ x}.Pairwise (Coprime on s) → { k // ∀ i ∈ x, k ≡ a i [MOD s i] })
        (↑l) (fun l nod x co => chineseRemainderOfList a s l ⋯) ⋯ nod hs pp) <
    (List.map s l).prod

tactic: exact chineseRemainderOfList_lt_prod a s l
  (List.Nodup.pairwise_of_forall_ne nod pp) (by simpa using hs)
state_before: case mk
ι : Type u_1
a s : ι → ℕ
l : List ι
nod : Multiset.Nodup (Quot.mk Setoid.r l)
hs : ∀ i ∈ Quot.mk Setoid.r l, s i ≠ 0
pp : {x | x ∈ Quot.mk Setoid.r l}.Pairwise (Coprime on s)
⊢ ↑(Quotient.recOn (motive := fun x =>
        x.Nodup → (∀ i ∈ x, ¬s i = 0) → {x_1 | x_1 ∈ x}.Pairwise (Coprime on s) → { k // ∀ i ∈ x, k ≡ a i [MOD s i] })
        (↑l) (fun l nod x co => chineseRemainderOfList a s l ⋯) ⋯ nod hs pp) <
    (List.map s l).prod
state_after: no goals

tactic: simpa using hs
state_before: ι : Type u_1
a s : ι → ℕ
l : List ι
nod : Multiset.Nodup (Quot.mk Setoid.r l)
hs : ∀ i ∈ Quot.mk Setoid.r l, s i ≠ 0
pp : {x | x ∈ Quot.mk Setoid.r l}.Pairwise (Coprime on s)
⊢ ∀ i ∈ l, s i ≠ 0
state_after: no goals