[GOAL]
M : Type uM
N : Type uN
P : Type uP
Q : Type uQ
inst✝¹ : MulOneClass M
inst✝ : CommMonoid N
⊢ ∀ (a b c : M →* N), a * b * c = a * (b * c)
[PROOFSTEP]
intros
[GOAL]
M : Type uM
N : Type uN
P : Type uP
Q : Type uQ
inst✝¹ : MulOneClass M
inst✝ : CommMonoid N
a✝ b✝ c✝ : M →* N
⊢ a✝ * b✝ * c✝ = a✝ * (b✝ * c✝)
[PROOFSTEP]
ext
[GOAL]
case h
M : Type uM
N : Type uN
P : Type uP
Q : Type uQ
inst✝¹ : MulOneClass M
inst✝ : CommMonoid N
a✝ b✝ c✝ : M →* N
x✝ : M
⊢ ↑(a✝ * b✝ * c✝) x✝ = ↑(a✝ * (b✝ * c✝)) x✝
[PROOFSTEP]
apply mul_assoc
[GOAL]
M : Type uM
N : Type uN
P : Type uP
Q : Type uQ
inst✝¹ : MulOneClass M
inst✝ : CommMonoid N
⊢ ∀ (a : M →* N), 1 * a = a
[PROOFSTEP]
intros
[GOAL]
M : Type uM
N : Type uN
P : Type uP
Q : Type uQ
inst✝¹ : MulOneClass M
inst✝ : CommMonoid N
a✝ : M →* N
⊢ 1 * a✝ = a✝
[PROOFSTEP]
ext
[GOAL]
case h
M : Type uM
N : Type uN
P : Type uP
Q : Type uQ
inst✝¹ : MulOneClass M
inst✝ : CommMonoid N
a✝ : M →* N
x✝ : M
⊢ ↑(1 * a✝) x✝ = ↑a✝ x✝
[PROOFSTEP]
apply one_mul
[GOAL]
M : Type uM
N : Type uN
P : Type uP
Q : Type uQ
inst✝¹ : MulOneClass M
inst✝ : CommMonoid N
⊢ ∀ (a : M →* N), a * 1 = a
[PROOFSTEP]
intros
[GOAL]
M : Type uM
N : Type uN
P : Type uP
Q : Type uQ
inst✝¹ : MulOneClass M
inst✝ : CommMonoid N
a✝ : M →* N
⊢ a✝ * 1 = a✝
[PROOFSTEP]
ext
[GOAL]
case h
M : Type uM
N : Type uN
P : Type uP
Q : Type uQ
inst✝¹ : MulOneClass M
inst✝ : CommMonoid N
a✝ : M →* N
x✝ : M
⊢ ↑(a✝ * 1) x✝ = ↑a✝ x✝
[PROOFSTEP]
apply mul_one
[GOAL]
M : Type uM
N : Type uN
P : Type uP
Q : Type uQ
inst✝¹ : MulOneClass M
inst✝ : CommMonoid N
n : ℕ
f : M →* N
⊢ (fun x => ↑f x ^ n) 1 = 1
[PROOFSTEP]
simp
[GOAL]
M : Type uM
N : Type uN
P : Type uP
Q : Type uQ
inst✝¹ : MulOneClass M
inst✝ : CommMonoid N
n : ℕ
f : M →* N
x y : M
⊢ OneHom.toFun { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) } (x * y) =
    OneHom.toFun { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) } x *
      OneHom.toFun { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) } y
[PROOFSTEP]
simp [mul_pow]
[GOAL]
M : Type uM
N : Type uN
P : Type uP
Q : Type uQ
inst✝¹ : MulOneClass M
inst✝ : CommMonoid N
f : M →* N
⊢ (fun n f =>
        { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },
          map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })
      0 f =
    1
[PROOFSTEP]
ext x
[GOAL]
case h
M : Type uM
N : Type uN
P : Type uP
Q : Type uQ
inst✝¹ : MulOneClass M
inst✝ : CommMonoid N
f : M →* N
x : M
⊢ ↑((fun n f =>
            { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },
              map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })
          0 f)
      x =
    ↑1 x
[PROOFSTEP]
simp
[GOAL]
M : Type uM
N : Type uN
P : Type uP
Q : Type uQ
inst✝¹ : MulOneClass M
inst✝ : CommMonoid N
n : ℕ
f : M →* N
⊢ (fun n f =>
        { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },
          map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })
      (n + 1) f =
    f *
      (fun n f =>
          { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },
            map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })
        n f
[PROOFSTEP]
ext x
[GOAL]
case h
M : Type uM
N : Type uN
P : Type uP
Q : Type uQ
inst✝¹ : MulOneClass M
inst✝ : CommMonoid N
n : ℕ
f : M →* N
x : M
⊢ ↑((fun n f =>
            { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },
              map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })
          (n + 1) f)
      x =
    ↑(f *
          (fun n f =>
              { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },
                map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })
            n f)
      x
[PROOFSTEP]
simp [pow_succ]
[GOAL]
M : Type uM
N : Type uN
P : Type uP
Q : Type uQ
inst✝¹ : MulOneClass M
inst✝ : CommMonoid N
⊢ ∀ (a b : M →* N), a * b = b * a
[PROOFSTEP]
intros
[GOAL]
M : Type uM
N : Type uN
P : Type uP
Q : Type uQ
inst✝¹ : MulOneClass M
inst✝ : CommMonoid N
a✝ b✝ : M →* N
⊢ a✝ * b✝ = b✝ * a✝
[PROOFSTEP]
ext
[GOAL]
case h
M : Type uM
N : Type uN
P : Type uP
Q : Type uQ
inst✝¹ : MulOneClass M
inst✝ : CommMonoid N
a✝ b✝ : M →* N
x✝ : M
⊢ ↑(a✝ * b✝) x✝ = ↑(b✝ * a✝) x✝
[PROOFSTEP]
apply mul_comm
[GOAL]
M✝ : Type uM
N : Type uN
P : Type uP
Q : Type uQ
M : Type ?u.8567
G : Type ?u.8570
inst✝¹ : MulOneClass M
inst✝ : CommGroup G
src✝ : CommMonoid (M →* G) := commMonoid
⊢ ∀ (a b : M →* G), a / b = a * b⁻¹
[PROOFSTEP]
intros
[GOAL]
M✝ : Type uM
N : Type uN
P : Type uP
Q : Type uQ
M : Type ?u.8567
G : Type ?u.8570
inst✝¹ : MulOneClass M
inst✝ : CommGroup G
src✝ : CommMonoid (M →* G) := commMonoid
a✝ b✝ : M →* G
⊢ a✝ / b✝ = a✝ * b✝⁻¹
[PROOFSTEP]
ext
[GOAL]
case h
M✝ : Type uM
N : Type uN
P : Type uP
Q : Type uQ
M : Type ?u.8567
G : Type ?u.8570
inst✝¹ : MulOneClass M
inst✝ : CommGroup G
src✝ : CommMonoid (M →* G) := commMonoid
a✝ b✝ : M →* G
x✝ : M
⊢ ↑(a✝ / b✝) x✝ = ↑(a✝ * b✝⁻¹) x✝
[PROOFSTEP]
apply div_eq_mul_inv
[GOAL]
M✝ : Type uM
N : Type uN
P : Type uP
Q : Type uQ
M : Type ?u.8567
G : Type ?u.8570
inst✝¹ : MulOneClass M
inst✝ : CommGroup G
src✝ : CommMonoid (M →* G) := commMonoid
n : ℤ
f : M →* G
⊢ (fun x => ↑f x ^ n) 1 = 1
[PROOFSTEP]
simp
[GOAL]
M✝ : Type uM
N : Type uN
P : Type uP
Q : Type uQ
M : Type ?u.8567
G : Type ?u.8570
inst✝¹ : MulOneClass M
inst✝ : CommGroup G
src✝ : CommMonoid (M →* G) := commMonoid
n : ℤ
f : M →* G
x y : M
⊢ OneHom.toFun { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) } (x * y) =
    OneHom.toFun { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) } x *
      OneHom.toFun { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) } y
[PROOFSTEP]
simp [mul_zpow]
[GOAL]
M✝ : Type uM
N : Type uN
P : Type uP
Q : Type uQ
M : Type ?u.8567
G : Type ?u.8570
inst✝¹ : MulOneClass M
inst✝ : CommGroup G
src✝ : CommMonoid (M →* G) := commMonoid
f : M →* G
⊢ (fun n f =>
        { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },
          map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })
      0 f =
    1
[PROOFSTEP]
ext x
[GOAL]
case h
M✝ : Type uM
N : Type uN
P : Type uP
Q : Type uQ
M : Type ?u.8567
G : Type ?u.8570
inst✝¹ : MulOneClass M
inst✝ : CommGroup G
src✝ : CommMonoid (M →* G) := commMonoid
f : M →* G
x : M
⊢ ↑((fun n f =>
            { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },
              map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })
          0 f)
      x =
    ↑1 x
[PROOFSTEP]
simp
[GOAL]
M✝ : Type uM
N : Type uN
P : Type uP
Q : Type uQ
M : Type ?u.8567
G : Type ?u.8570
inst✝¹ : MulOneClass M
inst✝ : CommGroup G
src✝ : CommMonoid (M →* G) := commMonoid
n : ℕ
f : M →* G
⊢ (fun n f =>
        { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },
          map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })
      (Int.ofNat (Nat.succ n)) f =
    f *
      (fun n f =>
          { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },
            map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })
        (Int.ofNat n) f
[PROOFSTEP]
ext x
[GOAL]
case h
M✝ : Type uM
N : Type uN
P : Type uP
Q : Type uQ
M : Type ?u.8567
G : Type ?u.8570
inst✝¹ : MulOneClass M
inst✝ : CommGroup G
src✝ : CommMonoid (M →* G) := commMonoid
n : ℕ
f : M →* G
x : M
⊢ ↑((fun n f =>
            { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },
              map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })
          (Int.ofNat (Nat.succ n)) f)
      x =
    ↑(f *
          (fun n f =>
              { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },
                map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })
            (Int.ofNat n) f)
      x
[PROOFSTEP]
simp [zpow_ofNat, pow_succ]
[GOAL]
M✝ : Type uM
N : Type uN
P : Type uP
Q : Type uQ
M : Type ?u.8567
G : Type ?u.8570
inst✝¹ : MulOneClass M
inst✝ : CommGroup G
src✝ : CommMonoid (M →* G) := commMonoid
n : ℕ
f : M →* G
⊢ (fun n f =>
        { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },
          map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })
      (Int.negSucc n) f =
    ((fun n f =>
          { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },
            map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })
        (↑(Nat.succ n)) f)⁻¹
[PROOFSTEP]
ext x
[GOAL]
case h
M✝ : Type uM
N : Type uN
P : Type uP
Q : Type uQ
M : Type ?u.8567
G : Type ?u.8570
inst✝¹ : MulOneClass M
inst✝ : CommGroup G
src✝ : CommMonoid (M →* G) := commMonoid
n : ℕ
f : M →* G
x : M
⊢ ↑((fun n f =>
            { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },
              map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })
          (Int.negSucc n) f)
      x =
    ↑((fun n f =>
              { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },
                map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })
            (↑(Nat.succ n)) f)⁻¹
      x
[PROOFSTEP]
simp [Nat.succ_eq_add_one, zpow_ofNat]
[GOAL]
M✝ : Type uM
N : Type uN
P : Type uP
Q : Type uQ
M : Type ?u.8567
G : Type ?u.8570
inst✝¹ : MulOneClass M
inst✝ : CommGroup G
src✝ : CommMonoid (M →* G) := commMonoid
⊢ ∀ (a : M →* G), a⁻¹ * a = 1
[PROOFSTEP]
intros
[GOAL]
M✝ : Type uM
N : Type uN
P : Type uP
Q : Type uQ
M : Type ?u.8567
G : Type ?u.8570
inst✝¹ : MulOneClass M
inst✝ : CommGroup G
src✝ : CommMonoid (M →* G) := commMonoid
a✝ : M →* G
⊢ a✝⁻¹ * a✝ = 1
[PROOFSTEP]
ext
[GOAL]
case h
M✝ : Type uM
N : Type uN
P : Type uP
Q : Type uQ
M : Type ?u.8567
G : Type ?u.8570
inst✝¹ : MulOneClass M
inst✝ : CommGroup G
src✝ : CommMonoid (M →* G) := commMonoid
a✝ : M →* G
x✝ : M
⊢ ↑(a✝⁻¹ * a✝) x✝ = ↑1 x✝
[PROOFSTEP]
apply mul_left_inv
[GOAL]
M : Type uM
N : Type uN
P : Type uP
Q : Type uQ
mM : MulOneClass M
mN : MulOneClass N
mP : CommMonoid P
f : M →* N →* P
y : N
⊢ (fun x => ↑(↑f x) y) 1 = 1
[PROOFSTEP]
simp [f.map_one, one_apply]
[GOAL]
M : Type uM
N : Type uN
P : Type uP
Q : Type uQ
mM : MulOneClass M
mN : MulOneClass N
mP : CommMonoid P
f : M →* N →* P
y : N
x₁ x₂ : M
⊢ OneHom.toFun { toFun := fun x => ↑(↑f x) y, map_one' := (_ : ↑(↑f 1) y = 1) } (x₁ * x₂) =
    OneHom.toFun { toFun := fun x => ↑(↑f x) y, map_one' := (_ : ↑(↑f 1) y = 1) } x₁ *
      OneHom.toFun { toFun := fun x => ↑(↑f x) y, map_one' := (_ : ↑(↑f 1) y = 1) } x₂
[PROOFSTEP]
simp [f.map_mul, mul_apply]
[GOAL]
M : Type uM
N : Type uN
P : Type uP
Q : Type uQ
inst✝² : MulOneClass M
inst✝¹ : CommMonoid N
inst✝ : CommMonoid P
⊢ (fun g =>
        { toOneHom := { toFun := comp g, map_one' := (_ : comp g 1 = 1) },
          map_mul' := (_ : ∀ (f₁ f₂ : M →* N), comp g (f₁ * f₂) = comp g f₁ * comp g f₂) })
      1 =
    1
[PROOFSTEP]
ext1 f
[GOAL]
case h
M : Type uM
N : Type uN
P : Type uP
Q : Type uQ
inst✝² : MulOneClass M
inst✝¹ : CommMonoid N
inst✝ : CommMonoid P
f : M →* N
⊢ ↑((fun g =>
            { toOneHom := { toFun := comp g, map_one' := (_ : comp g 1 = 1) },
              map_mul' := (_ : ∀ (f₁ f₂ : M →* N), comp g (f₁ * f₂) = comp g f₁ * comp g f₂) })
          1)
      f =
    ↑1 f
[PROOFSTEP]
exact one_comp f
[GOAL]
M : Type uM
N : Type uN
P : Type uP
Q : Type uQ
inst✝² : MulOneClass M
inst✝¹ : CommMonoid N
inst✝ : CommMonoid P
g₁ g₂ : N →* P
⊢ OneHom.toFun
      {
        toFun := fun g =>
          { toOneHom := { toFun := comp g, map_one' := (_ : comp g 1 = 1) },
            map_mul' := (_ : ∀ (f₁ f₂ : M →* N), comp g (f₁ * f₂) = comp g f₁ * comp g f₂) },
        map_one' :=
          (_ :
            (fun g =>
                  { toOneHom := { toFun := comp g, map_one' := (_ : comp g 1 = 1) },
                    map_mul' := (_ : ∀ (f₁ f₂ : M →* N), comp g (f₁ * f₂) = comp g f₁ * comp g f₂) })
                1 =
              1) }
      (g₁ * g₂) =
    OneHom.toFun
        {
          toFun := fun g =>
            { toOneHom := { toFun := comp g, map_one' := (_ : comp g 1 = 1) },
              map_mul' := (_ : ∀ (f₁ f₂ : M →* N), comp g (f₁ * f₂) = comp g f₁ * comp g f₂) },
          map_one' :=
            (_ :
              (fun g =>
                    { toOneHom := { toFun := comp g, map_one' := (_ : comp g 1 = 1) },
                      map_mul' := (_ : ∀ (f₁ f₂ : M →* N), comp g (f₁ * f₂) = comp g f₁ * comp g f₂) })
                  1 =
                1) }
        g₁ *
      OneHom.toFun
        {
          toFun := fun g =>
            { toOneHom := { toFun := comp g, map_one' := (_ : comp g 1 = 1) },
              map_mul' := (_ : ∀ (f₁ f₂ : M →* N), comp g (f₁ * f₂) = comp g f₁ * comp g f₂) },
          map_one' :=
            (_ :
              (fun g =>
                    { toOneHom := { toFun := comp g, map_one' := (_ : comp g 1 = 1) },
                      map_mul' := (_ : ∀ (f₁ f₂ : M →* N), comp g (f₁ * f₂) = comp g f₁ * comp g f₂) })
                  1 =
                1) }
        g₂
[PROOFSTEP]
ext1 f
[GOAL]
case h
M : Type uM
N : Type uN
P : Type uP
Q : Type uQ
inst✝² : MulOneClass M
inst✝¹ : CommMonoid N
inst✝ : CommMonoid P
g₁ g₂ : N →* P
f : M →* N
⊢ ↑(OneHom.toFun
          {
            toFun := fun g =>
              { toOneHom := { toFun := comp g, map_one' := (_ : comp g 1 = 1) },
                map_mul' := (_ : ∀ (f₁ f₂ : M →* N), comp g (f₁ * f₂) = comp g f₁ * comp g f₂) },
            map_one' :=
              (_ :
                (fun g =>
                      { toOneHom := { toFun := comp g, map_one' := (_ : comp g 1 = 1) },
                        map_mul' := (_ : ∀ (f₁ f₂ : M →* N), comp g (f₁ * f₂) = comp g f₁ * comp g f₂) })
                    1 =
                  1) }
          (g₁ * g₂))
      f =
    ↑(OneHom.toFun
            {
              toFun := fun g =>
                { toOneHom := { toFun := comp g, map_one' := (_ : comp g 1 = 1) },
                  map_mul' := (_ : ∀ (f₁ f₂ : M →* N), comp g (f₁ * f₂) = comp g f₁ * comp g f₂) },
              map_one' :=
                (_ :
                  (fun g =>
                        { toOneHom := { toFun := comp g, map_one' := (_ : comp g 1 = 1) },
                          map_mul' := (_ : ∀ (f₁ f₂ : M →* N), comp g (f₁ * f₂) = comp g f₁ * comp g f₂) })
                      1 =
                    1) }
            g₁ *
          OneHom.toFun
            {
              toFun := fun g =>
                { toOneHom := { toFun := comp g, map_one' := (_ : comp g 1 = 1) },
                  map_mul' := (_ : ∀ (f₁ f₂ : M →* N), comp g (f₁ * f₂) = comp g f₁ * comp g f₂) },
              map_one' :=
                (_ :
                  (fun g =>
                        { toOneHom := { toFun := comp g, map_one' := (_ : comp g 1 = 1) },
                          map_mul' := (_ : ∀ (f₁ f₂ : M →* N), comp g (f₁ * f₂) = comp g f₁ * comp g f₂) })
                      1 =
                    1) }
            g₂)
      f
[PROOFSTEP]
exact mul_comp g₁ g₂ f


[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoidWithZero α
p : α
hp : Prime p
s✝ : Multiset α
a : α
s : Multiset α
ih : p ∣ Multiset.prod s → ∃ a, a ∈ s ∧ p ∣ a
h : p ∣ Multiset.prod (a ::ₘ s)
⊢ p ∣ a * Multiset.prod s
[PROOFSTEP]
simpa using h
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoidWithZero α
p : α
hp : Prime p
s : Multiset β
f : β → α
h : p ∣ Multiset.prod (Multiset.map f s)
⊢ ∃ a, a ∈ s ∧ p ∣ f a
[PROOFSTEP]
simpa only [exists_prop, Multiset.mem_map, exists_exists_and_eq_and] using hp.exists_mem_multiset_dvd h
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CancelCommMonoidWithZero α
p : α
hp : Prime p
s : Multiset α
⊢ (∀ (r : α), r ∈ 0 → Prime r) → p ∣ Multiset.prod 0 → ∃ q, q ∈ 0 ∧ p ~ᵤ q
[PROOFSTEP]
simp [mt isUnit_iff_dvd_one.2 hp.not_unit]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CancelCommMonoidWithZero α
p : α
hp : Prime p
s✝ : Multiset α
a : α
s : Multiset α
ih : (∀ (r : α), r ∈ s → Prime r) → p ∣ Multiset.prod s → ∃ q, q ∈ s ∧ p ~ᵤ q
hs : ∀ (r : α), r ∈ a ::ₘ s → Prime r
hps : p ∣ Multiset.prod (a ::ₘ s)
⊢ ∃ q, q ∈ a ::ₘ s ∧ p ~ᵤ q
[PROOFSTEP]
rw [Multiset.prod_cons] at hps
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CancelCommMonoidWithZero α
p : α
hp : Prime p
s✝ : Multiset α
a : α
s : Multiset α
ih : (∀ (r : α), r ∈ s → Prime r) → p ∣ Multiset.prod s → ∃ q, q ∈ s ∧ p ~ᵤ q
hs : ∀ (r : α), r ∈ a ::ₘ s → Prime r
hps : p ∣ a * Multiset.prod s
⊢ ∃ q, q ∈ a ::ₘ s ∧ p ~ᵤ q
[PROOFSTEP]
cases' hp.dvd_or_dvd hps with h h
[GOAL]
case inl
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CancelCommMonoidWithZero α
p : α
hp : Prime p
s✝ : Multiset α
a : α
s : Multiset α
ih : (∀ (r : α), r ∈ s → Prime r) → p ∣ Multiset.prod s → ∃ q, q ∈ s ∧ p ~ᵤ q
hs : ∀ (r : α), r ∈ a ::ₘ s → Prime r
hps : p ∣ a * Multiset.prod s
h : p ∣ a
⊢ ∃ q, q ∈ a ::ₘ s ∧ p ~ᵤ q
[PROOFSTEP]
have hap := hs a (Multiset.mem_cons.2 (Or.inl rfl))
[GOAL]
case inl
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CancelCommMonoidWithZero α
p : α
hp : Prime p
s✝ : Multiset α
a : α
s : Multiset α
ih : (∀ (r : α), r ∈ s → Prime r) → p ∣ Multiset.prod s → ∃ q, q ∈ s ∧ p ~ᵤ q
hs : ∀ (r : α), r ∈ a ::ₘ s → Prime r
hps : p ∣ a * Multiset.prod s
h : p ∣ a
hap : Prime a
⊢ ∃ q, q ∈ a ::ₘ s ∧ p ~ᵤ q
[PROOFSTEP]
exact ⟨a, Multiset.mem_cons_self a _, hp.associated_of_dvd hap h⟩
[GOAL]
case inr
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CancelCommMonoidWithZero α
p : α
hp : Prime p
s✝ : Multiset α
a : α
s : Multiset α
ih : (∀ (r : α), r ∈ s → Prime r) → p ∣ Multiset.prod s → ∃ q, q ∈ s ∧ p ~ᵤ q
hs : ∀ (r : α), r ∈ a ::ₘ s → Prime r
hps : p ∣ a * Multiset.prod s
h : p ∣ Multiset.prod s
⊢ ∃ q, q ∈ a ::ₘ s ∧ p ~ᵤ q
[PROOFSTEP]
rcases ih (fun r hr => hs _ (Multiset.mem_cons.2 (Or.inr hr))) h with ⟨q, hq₁, hq₂⟩
[GOAL]
case inr.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CancelCommMonoidWithZero α
p : α
hp : Prime p
s✝ : Multiset α
a : α
s : Multiset α
ih : (∀ (r : α), r ∈ s → Prime r) → p ∣ Multiset.prod s → ∃ q, q ∈ s ∧ p ~ᵤ q
hs : ∀ (r : α), r ∈ a ::ₘ s → Prime r
hps : p ∣ a * Multiset.prod s
h : p ∣ Multiset.prod s
q : α
hq₁ : q ∈ s
hq₂ : p ~ᵤ q
⊢ ∃ q, q ∈ a ::ₘ s ∧ p ~ᵤ q
[PROOFSTEP]
exact ⟨q, Multiset.mem_cons.2 (Or.inr hq₁), hq₂⟩
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : (a : α) → DecidablePred (Associated a)
s : Multiset α
n : α
h : ∀ (a : α), a ∈ s → Prime a
div : ∀ (a : α), a ∈ s → a ∣ n
uniq : ∀ (a : α), countp (Associated a) s ≤ 1
⊢ prod s ∣ n
[PROOFSTEP]
induction' s using Multiset.induction_on with a s induct n primes divs generalizing n
[GOAL]
case empty
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : (a : α) → DecidablePred (Associated a)
s : Multiset α
n✝ : α
h✝ : ∀ (a : α), a ∈ s → Prime a
div✝ : ∀ (a : α), a ∈ s → a ∣ n✝
uniq✝ : ∀ (a : α), countp (Associated a) s ≤ 1
n : α
h : ∀ (a : α), a ∈ 0 → Prime a
div : ∀ (a : α), a ∈ 0 → a ∣ n
uniq : ∀ (a : α), countp (Associated a) 0 ≤ 1
⊢ prod 0 ∣ n
[PROOFSTEP]
simp only [Multiset.prod_zero, one_dvd]
[GOAL]
case cons
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : (a : α) → DecidablePred (Associated a)
s✝ : Multiset α
n✝ : α
h✝ : ∀ (a : α), a ∈ s✝ → Prime a
div✝ : ∀ (a : α), a ∈ s✝ → a ∣ n✝
uniq✝ : ∀ (a : α), countp (Associated a) s✝ ≤ 1
a : α
s : Multiset α
induct :
  ∀ (n : α),
    (∀ (a : α), a ∈ s → Prime a) → (∀ (a : α), a ∈ s → a ∣ n) → (∀ (a : α), countp (Associated a) s ≤ 1) → prod s ∣ n
n : α
h : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Prime a_1
div : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → a_1 ∣ n
uniq : ∀ (a_1 : α), countp (Associated a_1) (a ::ₘ s) ≤ 1
⊢ prod (a ::ₘ s) ∣ n
[PROOFSTEP]
rw [Multiset.prod_cons]
[GOAL]
case cons
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : (a : α) → DecidablePred (Associated a)
s✝ : Multiset α
n✝ : α
h✝ : ∀ (a : α), a ∈ s✝ → Prime a
div✝ : ∀ (a : α), a ∈ s✝ → a ∣ n✝
uniq✝ : ∀ (a : α), countp (Associated a) s✝ ≤ 1
a : α
s : Multiset α
induct :
  ∀ (n : α),
    (∀ (a : α), a ∈ s → Prime a) → (∀ (a : α), a ∈ s → a ∣ n) → (∀ (a : α), countp (Associated a) s ≤ 1) → prod s ∣ n
n : α
h : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Prime a_1
div : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → a_1 ∣ n
uniq : ∀ (a_1 : α), countp (Associated a_1) (a ::ₘ s) ≤ 1
⊢ a * prod s ∣ n
[PROOFSTEP]
obtain ⟨k, rfl⟩ : a ∣ n := div a (Multiset.mem_cons_self a s)
[GOAL]
case cons.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : (a : α) → DecidablePred (Associated a)
s✝ : Multiset α
n : α
h✝ : ∀ (a : α), a ∈ s✝ → Prime a
div✝ : ∀ (a : α), a ∈ s✝ → a ∣ n
uniq✝ : ∀ (a : α), countp (Associated a) s✝ ≤ 1
a : α
s : Multiset α
induct :
  ∀ (n : α),
    (∀ (a : α), a ∈ s → Prime a) → (∀ (a : α), a ∈ s → a ∣ n) → (∀ (a : α), countp (Associated a) s ≤ 1) → prod s ∣ n
h : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Prime a_1
uniq : ∀ (a_1 : α), countp (Associated a_1) (a ::ₘ s) ≤ 1
k : α
div : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → a_1 ∣ a * k
⊢ a * prod s ∣ a * k
[PROOFSTEP]
apply mul_dvd_mul_left a
[GOAL]
case cons.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : (a : α) → DecidablePred (Associated a)
s✝ : Multiset α
n : α
h✝ : ∀ (a : α), a ∈ s✝ → Prime a
div✝ : ∀ (a : α), a ∈ s✝ → a ∣ n
uniq✝ : ∀ (a : α), countp (Associated a) s✝ ≤ 1
a : α
s : Multiset α
induct :
  ∀ (n : α),
    (∀ (a : α), a ∈ s → Prime a) → (∀ (a : α), a ∈ s → a ∣ n) → (∀ (a : α), countp (Associated a) s ≤ 1) → prod s ∣ n
h : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Prime a_1
uniq : ∀ (a_1 : α), countp (Associated a_1) (a ::ₘ s) ≤ 1
k : α
div : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → a_1 ∣ a * k
⊢ prod s ∣ k
[PROOFSTEP]
refine
  induct _ (fun a ha => h a (Multiset.mem_cons_of_mem ha)) (fun b b_in_s => ?_) fun a =>
    (Multiset.countp_le_of_le _ (Multiset.le_cons_self _ _)).trans (uniq a)
[GOAL]
case cons.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : (a : α) → DecidablePred (Associated a)
s✝ : Multiset α
n : α
h✝ : ∀ (a : α), a ∈ s✝ → Prime a
div✝ : ∀ (a : α), a ∈ s✝ → a ∣ n
uniq✝ : ∀ (a : α), countp (Associated a) s✝ ≤ 1
a : α
s : Multiset α
induct :
  ∀ (n : α),
    (∀ (a : α), a ∈ s → Prime a) → (∀ (a : α), a ∈ s → a ∣ n) → (∀ (a : α), countp (Associated a) s ≤ 1) → prod s ∣ n
h : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Prime a_1
uniq : ∀ (a_1 : α), countp (Associated a_1) (a ::ₘ s) ≤ 1
k : α
div : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → a_1 ∣ a * k
b : α
b_in_s : b ∈ s
⊢ b ∣ k
[PROOFSTEP]
have b_div_n := div b (Multiset.mem_cons_of_mem b_in_s)
[GOAL]
case cons.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : (a : α) → DecidablePred (Associated a)
s✝ : Multiset α
n : α
h✝ : ∀ (a : α), a ∈ s✝ → Prime a
div✝ : ∀ (a : α), a ∈ s✝ → a ∣ n
uniq✝ : ∀ (a : α), countp (Associated a) s✝ ≤ 1
a : α
s : Multiset α
induct :
  ∀ (n : α),
    (∀ (a : α), a ∈ s → Prime a) → (∀ (a : α), a ∈ s → a ∣ n) → (∀ (a : α), countp (Associated a) s ≤ 1) → prod s ∣ n
h : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Prime a_1
uniq : ∀ (a_1 : α), countp (Associated a_1) (a ::ₘ s) ≤ 1
k : α
div : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → a_1 ∣ a * k
b : α
b_in_s : b ∈ s
b_div_n : b ∣ a * k
⊢ b ∣ k
[PROOFSTEP]
have a_prime := h a (Multiset.mem_cons_self a s)
[GOAL]
case cons.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : (a : α) → DecidablePred (Associated a)
s✝ : Multiset α
n : α
h✝ : ∀ (a : α), a ∈ s✝ → Prime a
div✝ : ∀ (a : α), a ∈ s✝ → a ∣ n
uniq✝ : ∀ (a : α), countp (Associated a) s✝ ≤ 1
a : α
s : Multiset α
induct :
  ∀ (n : α),
    (∀ (a : α), a ∈ s → Prime a) → (∀ (a : α), a ∈ s → a ∣ n) → (∀ (a : α), countp (Associated a) s ≤ 1) → prod s ∣ n
h : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Prime a_1
uniq : ∀ (a_1 : α), countp (Associated a_1) (a ::ₘ s) ≤ 1
k : α
div : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → a_1 ∣ a * k
b : α
b_in_s : b ∈ s
b_div_n : b ∣ a * k
a_prime : Prime a
⊢ b ∣ k
[PROOFSTEP]
have b_prime := h b (Multiset.mem_cons_of_mem b_in_s)
[GOAL]
case cons.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : (a : α) → DecidablePred (Associated a)
s✝ : Multiset α
n : α
h✝ : ∀ (a : α), a ∈ s✝ → Prime a
div✝ : ∀ (a : α), a ∈ s✝ → a ∣ n
uniq✝ : ∀ (a : α), countp (Associated a) s✝ ≤ 1
a : α
s : Multiset α
induct :
  ∀ (n : α),
    (∀ (a : α), a ∈ s → Prime a) → (∀ (a : α), a ∈ s → a ∣ n) → (∀ (a : α), countp (Associated a) s ≤ 1) → prod s ∣ n
h : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Prime a_1
uniq : ∀ (a_1 : α), countp (Associated a_1) (a ::ₘ s) ≤ 1
k : α
div : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → a_1 ∣ a * k
b : α
b_in_s : b ∈ s
b_div_n : b ∣ a * k
a_prime : Prime a
b_prime : Prime b
⊢ b ∣ k
[PROOFSTEP]
refine' (b_prime.dvd_or_dvd b_div_n).resolve_left fun b_div_a => _
[GOAL]
case cons.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : (a : α) → DecidablePred (Associated a)
s✝ : Multiset α
n : α
h✝ : ∀ (a : α), a ∈ s✝ → Prime a
div✝ : ∀ (a : α), a ∈ s✝ → a ∣ n
uniq✝ : ∀ (a : α), countp (Associated a) s✝ ≤ 1
a : α
s : Multiset α
induct :
  ∀ (n : α),
    (∀ (a : α), a ∈ s → Prime a) → (∀ (a : α), a ∈ s → a ∣ n) → (∀ (a : α), countp (Associated a) s ≤ 1) → prod s ∣ n
h : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Prime a_1
uniq : ∀ (a_1 : α), countp (Associated a_1) (a ::ₘ s) ≤ 1
k : α
div : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → a_1 ∣ a * k
b : α
b_in_s : b ∈ s
b_div_n : b ∣ a * k
a_prime : Prime a
b_prime : Prime b
b_div_a : b ∣ a
⊢ False
[PROOFSTEP]
have assoc := b_prime.associated_of_dvd a_prime b_div_a
[GOAL]
case cons.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : (a : α) → DecidablePred (Associated a)
s✝ : Multiset α
n : α
h✝ : ∀ (a : α), a ∈ s✝ → Prime a
div✝ : ∀ (a : α), a ∈ s✝ → a ∣ n
uniq✝ : ∀ (a : α), countp (Associated a) s✝ ≤ 1
a : α
s : Multiset α
induct :
  ∀ (n : α),
    (∀ (a : α), a ∈ s → Prime a) → (∀ (a : α), a ∈ s → a ∣ n) → (∀ (a : α), countp (Associated a) s ≤ 1) → prod s ∣ n
h : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Prime a_1
uniq : ∀ (a_1 : α), countp (Associated a_1) (a ::ₘ s) ≤ 1
k : α
div : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → a_1 ∣ a * k
b : α
b_in_s : b ∈ s
b_div_n : b ∣ a * k
a_prime : Prime a
b_prime : Prime b
b_div_a : b ∣ a
assoc : b ~ᵤ a
⊢ False
[PROOFSTEP]
have := uniq a
[GOAL]
case cons.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : (a : α) → DecidablePred (Associated a)
s✝ : Multiset α
n : α
h✝ : ∀ (a : α), a ∈ s✝ → Prime a
div✝ : ∀ (a : α), a ∈ s✝ → a ∣ n
uniq✝ : ∀ (a : α), countp (Associated a) s✝ ≤ 1
a : α
s : Multiset α
induct :
  ∀ (n : α),
    (∀ (a : α), a ∈ s → Prime a) → (∀ (a : α), a ∈ s → a ∣ n) → (∀ (a : α), countp (Associated a) s ≤ 1) → prod s ∣ n
h : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Prime a_1
uniq : ∀ (a_1 : α), countp (Associated a_1) (a ::ₘ s) ≤ 1
k : α
div : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → a_1 ∣ a * k
b : α
b_in_s : b ∈ s
b_div_n : b ∣ a * k
a_prime : Prime a
b_prime : Prime b
b_div_a : b ∣ a
assoc : b ~ᵤ a
this : countp (Associated a) (a ::ₘ s) ≤ 1
⊢ False
[PROOFSTEP]
rw [Multiset.countp_cons_of_pos _ (Associated.refl _), Nat.succ_le_succ_iff, ← not_lt, Multiset.countp_pos] at this
[GOAL]
case cons.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : (a : α) → DecidablePred (Associated a)
s✝ : Multiset α
n : α
h✝ : ∀ (a : α), a ∈ s✝ → Prime a
div✝ : ∀ (a : α), a ∈ s✝ → a ∣ n
uniq✝ : ∀ (a : α), countp (Associated a) s✝ ≤ 1
a : α
s : Multiset α
induct :
  ∀ (n : α),
    (∀ (a : α), a ∈ s → Prime a) → (∀ (a : α), a ∈ s → a ∣ n) → (∀ (a : α), countp (Associated a) s ≤ 1) → prod s ∣ n
h : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Prime a_1
uniq : ∀ (a_1 : α), countp (Associated a_1) (a ::ₘ s) ≤ 1
k : α
div : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → a_1 ∣ a * k
b : α
b_in_s : b ∈ s
b_div_n : b ∣ a * k
a_prime : Prime a
b_prime : Prime b
b_div_a : b ∣ a
assoc : b ~ᵤ a
this : ¬∃ a_1, a_1 ∈ s ∧ a ~ᵤ a_1
⊢ False
[PROOFSTEP]
exact this ⟨b, b_in_s, assoc.symm⟩
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : Unique αˣ
s : Finset α
n : α
h : ∀ (a : α), a ∈ s → Prime a
div : ∀ (a : α), a ∈ s → a ∣ n
⊢ ∏ p in s, p ∣ n
[PROOFSTEP]
classical exact
  Multiset.prod_primes_dvd n (by simpa only [Multiset.map_id', Finset.mem_def] using h)
    (by simpa only [Multiset.map_id', Finset.mem_def] using div)
    (by
      -- POrting note: was
                -- `simp only [Multiset.map_id', associated_eq_eq, Multiset.countp_eq_card_filter, ←
                --    Multiset.count_eq_card_filter_eq, ← Multiset.nodup_iff_count_le_one, s.nodup]`
      intro a
      simp only [Multiset.map_id', associated_eq_eq, Multiset.countp_eq_card_filter]
      change Multiset.card (Multiset.filter (fun b => a = b) s.val) ≤ 1
      apply le_of_eq_of_le (Multiset.count_eq_card_filter_eq _ _).symm
      apply Multiset.nodup_iff_count_le_one.mp
      exact s.nodup)
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : Unique αˣ
s : Finset α
n : α
h : ∀ (a : α), a ∈ s → Prime a
div : ∀ (a : α), a ∈ s → a ∣ n
⊢ ∏ p in s, p ∣ n
[PROOFSTEP]
exact
  Multiset.prod_primes_dvd n (by simpa only [Multiset.map_id', Finset.mem_def] using h)
    (by simpa only [Multiset.map_id', Finset.mem_def] using div)
    (by
      -- POrting note: was
                -- `simp only [Multiset.map_id', associated_eq_eq, Multiset.countp_eq_card_filter, ←
                --    Multiset.count_eq_card_filter_eq, ← Multiset.nodup_iff_count_le_one, s.nodup]`
      intro a
      simp only [Multiset.map_id', associated_eq_eq, Multiset.countp_eq_card_filter]
      change Multiset.card (Multiset.filter (fun b => a = b) s.val) ≤ 1
      apply le_of_eq_of_le (Multiset.count_eq_card_filter_eq _ _).symm
      apply Multiset.nodup_iff_count_le_one.mp
      exact s.nodup)
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : Unique αˣ
s : Finset α
n : α
h : ∀ (a : α), a ∈ s → Prime a
div : ∀ (a : α), a ∈ s → a ∣ n
⊢ ∀ (a : α), a ∈ Multiset.map (fun p => p) s.val → Prime a
[PROOFSTEP]
simpa only [Multiset.map_id', Finset.mem_def] using h
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : Unique αˣ
s : Finset α
n : α
h : ∀ (a : α), a ∈ s → Prime a
div : ∀ (a : α), a ∈ s → a ∣ n
⊢ ∀ (a : α), a ∈ Multiset.map (fun p => p) s.val → a ∣ n
[PROOFSTEP]
simpa only [Multiset.map_id', Finset.mem_def] using div
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : Unique αˣ
s : Finset α
n : α
h : ∀ (a : α), a ∈ s → Prime a
div : ∀ (a : α), a ∈ s → a ∣ n
⊢ ∀ (a : α), Multiset.countp (Associated a) (Multiset.map (fun p => p) s.val) ≤ 1
[PROOFSTEP]
intro a
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : Unique αˣ
s : Finset α
n : α
h : ∀ (a : α), a ∈ s → Prime a
div : ∀ (a : α), a ∈ s → a ∣ n
a : α
⊢ Multiset.countp (Associated a) (Multiset.map (fun p => p) s.val) ≤ 1
[PROOFSTEP]
simp only [Multiset.map_id', associated_eq_eq, Multiset.countp_eq_card_filter]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : Unique αˣ
s : Finset α
n : α
h : ∀ (a : α), a ∈ s → Prime a
div : ∀ (a : α), a ∈ s → a ∣ n
a : α
⊢ ↑Multiset.card (Multiset.filter (Eq a) s.val) ≤ 1
[PROOFSTEP]
change Multiset.card (Multiset.filter (fun b => a = b) s.val) ≤ 1
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : Unique αˣ
s : Finset α
n : α
h : ∀ (a : α), a ∈ s → Prime a
div : ∀ (a : α), a ∈ s → a ∣ n
a : α
⊢ ↑Multiset.card (Multiset.filter (fun b => a = b) s.val) ≤ 1
[PROOFSTEP]
apply le_of_eq_of_le (Multiset.count_eq_card_filter_eq _ _).symm
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : Unique αˣ
s : Finset α
n : α
h : ∀ (a : α), a ∈ s → Prime a
div : ∀ (a : α), a ∈ s → a ∣ n
a : α
⊢ Multiset.count a s.val ≤ 1
[PROOFSTEP]
apply Multiset.nodup_iff_count_le_one.mp
[GOAL]
case a
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : Unique αˣ
s : Finset α
n : α
h : ∀ (a : α), a ∈ s → Prime a
div : ∀ (a : α), a ∈ s → a ∣ n
a : α
⊢ Multiset.Nodup s.val
[PROOFSTEP]
exact s.nodup
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
p : Multiset α
⊢ Multiset.prod (Multiset.map Associates.mk 0) = Associates.mk (Multiset.prod 0)
[PROOFSTEP]
simp
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
p : Multiset α
a : α
s : Multiset α
ih : Multiset.prod (Multiset.map Associates.mk s) = Associates.mk (Multiset.prod s)
⊢ Multiset.prod (Multiset.map Associates.mk (a ::ₘ s)) = Associates.mk (Multiset.prod (a ::ₘ s))
[PROOFSTEP]
simp [ih, Associates.mk_mul_mk]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
p : Finset β
f : β → α
⊢ ∏ i in p, Associates.mk (f i) = Associates.mk (∏ i in p, f i)
[PROOFSTEP]
have : (fun i => Associates.mk (f i)) = Associates.mk ∘ f := funext <| fun x => Function.comp_apply
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
p : Finset β
f : β → α
this : (fun i => Associates.mk (f i)) = Associates.mk ∘ f
⊢ ∏ i in p, Associates.mk (f i) = Associates.mk (∏ i in p, f i)
[PROOFSTEP]
rw [Finset.prod_eq_multiset_prod, this, ← Multiset.map_map, prod_mk, ← Finset.prod_eq_multiset_prod]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
p q : Multiset α
⊢ Multiset.Rel Associated p q ↔ Multiset.map Associates.mk p = Multiset.map Associates.mk q
[PROOFSTEP]
rw [← Multiset.rel_eq, Multiset.rel_map]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
p q : Multiset α
⊢ Multiset.Rel Associated p q ↔ Multiset.Rel (fun a b => Associates.mk a = Associates.mk b) p q
[PROOFSTEP]
simp only [mk_eq_mk_iff_associated]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
p : Multiset (Associates α)
⊢ Multiset.prod 0 = 1 ↔ ∀ (a : Associates α), a ∈ 0 → a = 1
[PROOFSTEP]
simp
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
p : Multiset (Associates α)
⊢ ∀ ⦃a : Associates α⦄ {s : Multiset (Associates α)},
    (Multiset.prod s = 1 ↔ ∀ (a : Associates α), a ∈ s → a = 1) →
      (Multiset.prod (a ::ₘ s) = 1 ↔ ∀ (a_2 : Associates α), a_2 ∈ a ::ₘ s → a_2 = 1)
[PROOFSTEP]
simp (config := { contextual := true }) [mul_eq_one_iff, or_imp, forall_and]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
p q : Multiset (Associates α)
h : p ≤ q
⊢ Multiset.prod p ≤ Multiset.prod q
[PROOFSTEP]
haveI := Classical.decEq (Associates α)
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
p q : Multiset (Associates α)
h : p ≤ q
this : DecidableEq (Associates α)
⊢ Multiset.prod p ≤ Multiset.prod q
[PROOFSTEP]
haveI := Classical.decEq α
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
p q : Multiset (Associates α)
h : p ≤ q
this✝ : DecidableEq (Associates α)
this : DecidableEq α
⊢ Multiset.prod p ≤ Multiset.prod q
[PROOFSTEP]
suffices p.prod ≤ (p + (q - p)).prod by rwa [add_tsub_cancel_of_le h] at this
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
p q : Multiset (Associates α)
h : p ≤ q
this✝¹ : DecidableEq (Associates α)
this✝ : DecidableEq α
this : Multiset.prod p ≤ Multiset.prod (p + (q - p))
⊢ Multiset.prod p ≤ Multiset.prod q
[PROOFSTEP]
rwa [add_tsub_cancel_of_le h] at this
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
p q : Multiset (Associates α)
h : p ≤ q
this✝ : DecidableEq (Associates α)
this : DecidableEq α
⊢ Multiset.prod p ≤ Multiset.prod (p + (q - p))
[PROOFSTEP]
suffices p.prod * 1 ≤ p.prod * (q - p).prod by simpa
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
p q : Multiset (Associates α)
h : p ≤ q
this✝¹ : DecidableEq (Associates α)
this✝ : DecidableEq α
this : Multiset.prod p * 1 ≤ Multiset.prod p * Multiset.prod (q - p)
⊢ Multiset.prod p ≤ Multiset.prod (p + (q - p))
[PROOFSTEP]
simpa
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
p q : Multiset (Associates α)
h : p ≤ q
this✝ : DecidableEq (Associates α)
this : DecidableEq α
⊢ Multiset.prod p * 1 ≤ Multiset.prod p * Multiset.prod (q - p)
[PROOFSTEP]
exact mul_mono (le_refl p.prod) one_le
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CancelCommMonoidWithZero α
s✝ : Multiset (Associates α)
p : Associates α
hp : Prime p
a : Associates α
s : Multiset (Associates α)
ih : p ≤ Multiset.prod s → ∃ a, a ∈ s ∧ p ≤ a
h : p ≤ Multiset.prod (a ::ₘ s)
⊢ p ≤ a * Multiset.prod s
[PROOFSTEP]
simpa using h


[GOAL]
x : SimplexCategory
⊢ Fintype (ConcreteCategory.forget.obj x)
[PROOFSTEP]
change (Fintype (Fin _))
[GOAL]
x : SimplexCategory
⊢ Fintype (Fin (len x + 1))
[PROOFSTEP]
infer_instance
[GOAL]
x y : SimplexCategory
f : x ⟶ y
g : ↑(toTopObj x)
⊢ (fun i => ∑ j in Finset.filter (fun k => ↑f k = i) Finset.univ, ↑g j) ∈ toTopObj y
[PROOFSTEP]
simp only [Finset.sum_congr, toTopObj, Set.mem_setOf]
[GOAL]
x y : SimplexCategory
f : x ⟶ y
g : ↑(toTopObj x)
⊢ ∑ i : (forget SimplexCategory).obj y, ∑ x_1 in Finset.filter (fun k => ↑f k = i) Finset.univ, ↑g x_1 = 1
[PROOFSTEP]
rw [← Finset.sum_biUnion]
[GOAL]
x y : SimplexCategory
f : x ⟶ y
g : ↑(toTopObj x)
⊢ ∑ x_1 in Finset.biUnion Finset.univ fun i => Finset.filter (fun k => ↑f k = i) Finset.univ, ↑g x_1 = 1
x y : SimplexCategory
f : x ⟶ y
g : ↑(toTopObj x)
⊢ Set.PairwiseDisjoint ↑Finset.univ fun i => Finset.filter (fun k => ↑f k = i) Finset.univ
[PROOFSTEP]
have hg := g.2
[GOAL]
x y : SimplexCategory
f : x ⟶ y
g : ↑(toTopObj x)
hg : ↑g ∈ toTopObj x
⊢ ∑ x_1 in Finset.biUnion Finset.univ fun i => Finset.filter (fun k => ↑f k = i) Finset.univ, ↑g x_1 = 1
x y : SimplexCategory
f : x ⟶ y
g : ↑(toTopObj x)
⊢ Set.PairwiseDisjoint ↑Finset.univ fun i => Finset.filter (fun k => ↑f k = i) Finset.univ
[PROOFSTEP]
dsimp [toTopObj] at hg
[GOAL]
x y : SimplexCategory
f : x ⟶ y
g : ↑(toTopObj x)
hg : ∑ i : (forget SimplexCategory).obj x, ↑g i = 1
⊢ ∑ x_1 in Finset.biUnion Finset.univ fun i => Finset.filter (fun k => ↑f k = i) Finset.univ, ↑g x_1 = 1
x y : SimplexCategory
f : x ⟶ y
g : ↑(toTopObj x)
⊢ Set.PairwiseDisjoint ↑Finset.univ fun i => Finset.filter (fun k => ↑f k = i) Finset.univ
[PROOFSTEP]
convert hg
[GOAL]
case h.e'_2.h
x y : SimplexCategory
f : x ⟶ y
g : ↑(toTopObj x)
hg : ∑ i : (forget SimplexCategory).obj x, ↑g i = 1
⊢ (Finset.biUnion Finset.univ fun i => Finset.filter (fun k => ↑f k = i) Finset.univ) = Finset.univ
[PROOFSTEP]
simp [Finset.eq_univ_iff_forall]
[GOAL]
x y : SimplexCategory
f : x ⟶ y
g : ↑(toTopObj x)
⊢ Set.PairwiseDisjoint ↑Finset.univ fun i => Finset.filter (fun k => ↑f k = i) Finset.univ
[PROOFSTEP]
intro i _ j _ h
[GOAL]
x y : SimplexCategory
f : x ⟶ y
g : ↑(toTopObj x)
i : (forget SimplexCategory).obj y
a✝¹ : i ∈ ↑Finset.univ
j : (forget SimplexCategory).obj y
a✝ : j ∈ ↑Finset.univ
h : i ≠ j
⊢ (Disjoint on fun i => Finset.filter (fun k => ↑f k = i) Finset.univ) i j
[PROOFSTEP]
rw [Function.onFun, disjoint_iff_inf_le]
[GOAL]
x y : SimplexCategory
f : x ⟶ y
g : ↑(toTopObj x)
i : (forget SimplexCategory).obj y
a✝¹ : i ∈ ↑Finset.univ
j : (forget SimplexCategory).obj y
a✝ : j ∈ ↑Finset.univ
h : i ≠ j
⊢ Finset.filter (fun k => ↑f k = i) Finset.univ ⊓ Finset.filter (fun k => ↑f k = j) Finset.univ ≤ ⊥
[PROOFSTEP]
intro e he
[GOAL]
x y : SimplexCategory
f : x ⟶ y
g : ↑(toTopObj x)
i : (forget SimplexCategory).obj y
a✝¹ : i ∈ ↑Finset.univ
j : (forget SimplexCategory).obj y
a✝ : j ∈ ↑Finset.univ
h : i ≠ j
e : (forget SimplexCategory).obj x
he : e ∈ Finset.filter (fun k => ↑f k = i) Finset.univ ⊓ Finset.filter (fun k => ↑f k = j) Finset.univ
⊢ e ∈ ⊥
[PROOFSTEP]
simp only [Finset.bot_eq_empty, Finset.not_mem_empty]
[GOAL]
x y : SimplexCategory
f : x ⟶ y
g : ↑(toTopObj x)
i : (forget SimplexCategory).obj y
a✝¹ : i ∈ ↑Finset.univ
j : (forget SimplexCategory).obj y
a✝ : j ∈ ↑Finset.univ
h : i ≠ j
e : (forget SimplexCategory).obj x
he : e ∈ Finset.filter (fun k => ↑f k = i) Finset.univ ⊓ Finset.filter (fun k => ↑f k = j) Finset.univ
⊢ False
[PROOFSTEP]
apply h
[GOAL]
x y : SimplexCategory
f : x ⟶ y
g : ↑(toTopObj x)
i : (forget SimplexCategory).obj y
a✝¹ : i ∈ ↑Finset.univ
j : (forget SimplexCategory).obj y
a✝ : j ∈ ↑Finset.univ
h : i ≠ j
e : (forget SimplexCategory).obj x
he : e ∈ Finset.filter (fun k => ↑f k = i) Finset.univ ⊓ Finset.filter (fun k => ↑f k = j) Finset.univ
⊢ i = j
[PROOFSTEP]
simp only [Finset.mem_univ, forall_true_left, ge_iff_le, Finset.le_eq_subset, Finset.inf_eq_inter, Finset.mem_inter,
  Finset.mem_filter, true_and] at he
[GOAL]
x y : SimplexCategory
f : x ⟶ y
g : ↑(toTopObj x)
i : (forget SimplexCategory).obj y
a✝¹ : i ∈ ↑Finset.univ
j : (forget SimplexCategory).obj y
a✝ : j ∈ ↑Finset.univ
h : i ≠ j
e : (forget SimplexCategory).obj x
he : ↑f e = i ∧ ↑f e = j
⊢ i = j
[PROOFSTEP]
rw [← he.1, he.2]
[GOAL]
x y : SimplexCategory
f : x ⟶ y
⊢ Continuous (toTopMap f)
[PROOFSTEP]
refine' Continuous.subtype_mk (continuous_pi fun i => _) _
[GOAL]
x y : SimplexCategory
f : x ⟶ y
i : (forget SimplexCategory).obj y
⊢ Continuous fun a => ∑ j in Finset.filter (fun k => ↑f k = i) Finset.univ, ↑a j
[PROOFSTEP]
dsimp only [coe_toTopMap]
[GOAL]
x y : SimplexCategory
f : x ⟶ y
i : (forget SimplexCategory).obj y
⊢ Continuous fun a => ∑ j in Finset.filter (fun k => ↑f k = i) Finset.univ, ↑a j
[PROOFSTEP]
exact continuous_finset_sum _ (fun j _ => (continuous_apply _).comp continuous_subtype_val)
[GOAL]
X✝ Y✝ : SimplexCategory
f : X✝ ⟶ Y✝
⊢ Continuous (toTopMap f)
[PROOFSTEP]
continuity
[GOAL]
⊢ ∀ (X : SimplexCategory),
    { obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map (𝟙 X) =
      𝟙 ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X)
[PROOFSTEP]
intro Δ
[GOAL]
Δ : SimplexCategory
⊢ { obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map (𝟙 Δ) =
    𝟙 ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj Δ)
[PROOFSTEP]
ext f
[GOAL]
case w
Δ : SimplexCategory
f :
  (forget TopCat).obj
    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj Δ)
⊢ ↑({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map (𝟙 Δ)) f =
    ↑(𝟙 ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj Δ)) f
[PROOFSTEP]
apply toTopObj.ext
[GOAL]
case w.a
Δ : SimplexCategory
f :
  (forget TopCat).obj
    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj Δ)
⊢ ↑(↑({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map (𝟙 Δ)) f) =
    ↑(↑(𝟙 ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj Δ)) f)
[PROOFSTEP]
funext i
[GOAL]
case w.a.h
Δ : SimplexCategory
f :
  (forget TopCat).obj
    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj Δ)
i : (forget SimplexCategory).obj Δ
⊢ ↑(↑({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map (𝟙 Δ)) f) i =
    ↑(↑(𝟙 ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj Δ)) f) i
[PROOFSTEP]
change (Finset.univ.filter fun k => k = i).sum _ = _
[GOAL]
case w.a.h
Δ : SimplexCategory
f :
  (forget TopCat).obj
    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj Δ)
i : (forget SimplexCategory).obj Δ
⊢ ∑ j in Finset.filter (fun k => k = i) Finset.univ, ↑f j =
    ↑(↑(𝟙 ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj Δ)) f) i
[PROOFSTEP]
simp [Finset.sum_filter, CategoryTheory.id_apply]
[GOAL]
X✝ Y✝ Z✝ : SimplexCategory
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
⊢ { obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map (f ≫ g) =
    { obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map f ≫
      { obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map g
[PROOFSTEP]
ext h
[GOAL]
case w
X✝ Y✝ Z✝ : SimplexCategory
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
h :
  (forget TopCat).obj
    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)
⊢ ↑({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map (f ≫ g)) h =
    ↑({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map f ≫
          { obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map g)
      h
[PROOFSTEP]
apply toTopObj.ext
[GOAL]
case w.a
X✝ Y✝ Z✝ : SimplexCategory
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
h :
  (forget TopCat).obj
    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)
⊢ ↑(↑({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map (f ≫ g)) h) =
    ↑(↑({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map f ≫
            { obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map g)
        h)
[PROOFSTEP]
funext i
[GOAL]
case w.a.h
X✝ Y✝ Z✝ : SimplexCategory
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
h :
  (forget TopCat).obj
    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)
i : (forget SimplexCategory).obj Z✝
⊢ ↑(↑({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map (f ≫ g)) h)
      i =
    ↑(↑({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map f ≫
              { obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map g)
          h)
      i
[PROOFSTEP]
dsimp
[GOAL]
case w.a.h
X✝ Y✝ Z✝ : SimplexCategory
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
h :
  (forget TopCat).obj
    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)
i : (forget SimplexCategory).obj Z✝
⊢ ↑(↑(ContinuousMap.mk (toTopMap (Hom.mk (OrderHom.comp (Hom.toOrderHom g) (Hom.toOrderHom f))))) h) i =
    ↑(↑(ContinuousMap.mk (toTopMap f) ≫ ContinuousMap.mk (toTopMap g)) h) i
[PROOFSTEP]
rw [CategoryTheory.comp_apply, ContinuousMap.coe_mk, ContinuousMap.coe_mk, ContinuousMap.coe_mk]
[GOAL]
case w.a.h
X✝ Y✝ Z✝ : SimplexCategory
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
h :
  (forget TopCat).obj
    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)
i : (forget SimplexCategory).obj Z✝
⊢ ↑(toTopMap (Hom.mk (OrderHom.comp (Hom.toOrderHom g) (Hom.toOrderHom f))) h) i = ↑(toTopMap g (toTopMap f h)) i
[PROOFSTEP]
simp only [coe_toTopMap]
[GOAL]
case w.a.h
X✝ Y✝ Z✝ : SimplexCategory
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
h :
  (forget TopCat).obj
    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)
i : (forget SimplexCategory).obj Z✝
⊢ ∑ j in Finset.filter (fun k => ↑(Hom.mk (OrderHom.comp (Hom.toOrderHom g) (Hom.toOrderHom f))) k = i) Finset.univ,
      ↑h j =
    ∑ x in Finset.filter (fun k => ↑g k = i) Finset.univ, ∑ j in Finset.filter (fun k => ↑f k = x) Finset.univ, ↑h j
[PROOFSTEP]
erw [← Finset.sum_biUnion]
[GOAL]
case w.a.h
X✝ Y✝ Z✝ : SimplexCategory
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
h :
  (forget TopCat).obj
    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)
i : (forget SimplexCategory).obj Z✝
⊢ ∑ j in Finset.filter (fun k => ↑(Hom.mk (OrderHom.comp (Hom.toOrderHom g) (Hom.toOrderHom f))) k = i) Finset.univ,
      ↑h j =
    ∑ x in
      Finset.biUnion (Finset.filter (fun k => ↑g k = i) Finset.univ) fun x =>
        Finset.filter (fun k => ↑f k = x) Finset.univ,
      ↑h x
[PROOFSTEP]
apply Finset.sum_congr
[GOAL]
case w.a.h.h
X✝ Y✝ Z✝ : SimplexCategory
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
h :
  (forget TopCat).obj
    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)
i : (forget SimplexCategory).obj Z✝
⊢ Finset.filter (fun k => ↑(Hom.mk (OrderHom.comp (Hom.toOrderHom g) (Hom.toOrderHom f))) k = i) Finset.univ =
    Finset.biUnion (Finset.filter (fun k => ↑g k = i) Finset.univ) fun x =>
      Finset.filter (fun k => ↑f k = x) Finset.univ
[PROOFSTEP]
exact Finset.ext (fun j => ⟨fun hj => by simpa using hj, fun hj => by simpa using hj⟩)
[GOAL]
X✝ Y✝ Z✝ : SimplexCategory
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
h :
  (forget TopCat).obj
    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)
i : (forget SimplexCategory).obj Z✝
j : (forget SimplexCategory).obj X✝
hj : j ∈ Finset.filter (fun k => ↑(Hom.mk (OrderHom.comp (Hom.toOrderHom g) (Hom.toOrderHom f))) k = i) Finset.univ
⊢ j ∈
    Finset.biUnion (Finset.filter (fun k => ↑g k = i) Finset.univ) fun x =>
      Finset.filter (fun k => ↑f k = x) Finset.univ
[PROOFSTEP]
simpa using hj
[GOAL]
X✝ Y✝ Z✝ : SimplexCategory
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
h :
  (forget TopCat).obj
    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)
i : (forget SimplexCategory).obj Z✝
j : (forget SimplexCategory).obj X✝
hj :
  j ∈
    Finset.biUnion (Finset.filter (fun k => ↑g k = i) Finset.univ) fun x =>
      Finset.filter (fun k => ↑f k = x) Finset.univ
⊢ j ∈ Finset.filter (fun k => ↑(Hom.mk (OrderHom.comp (Hom.toOrderHom g) (Hom.toOrderHom f))) k = i) Finset.univ
[PROOFSTEP]
simpa using hj
[GOAL]
case w.a.h.a
X✝ Y✝ Z✝ : SimplexCategory
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
h :
  (forget TopCat).obj
    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)
i : (forget SimplexCategory).obj Z✝
⊢ ∀ (x : (forget SimplexCategory).obj X✝),
    (x ∈
        Finset.biUnion (Finset.filter (fun k => ↑g k = i) Finset.univ) fun x =>
          Finset.filter (fun k => ↑f k = x) Finset.univ) →
      ↑h x = ↑h x
[PROOFSTEP]
tauto
[GOAL]
case w.a.h
X✝ Y✝ Z✝ : SimplexCategory
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
h :
  (forget TopCat).obj
    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)
i : (forget SimplexCategory).obj Z✝
⊢ Set.PairwiseDisjoint ↑(Finset.filter (fun k => ↑g k = i) Finset.univ) fun x =>
    Finset.filter (fun k => ↑f k = x) Finset.univ
[PROOFSTEP]
intro j _ k _ h
[GOAL]
case w.a.h
X✝ Y✝ Z✝ : SimplexCategory
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
h✝ :
  (forget TopCat).obj
    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)
i : (forget SimplexCategory).obj Z✝
j : (forget SimplexCategory).obj Y✝
a✝¹ : j ∈ ↑(Finset.filter (fun k => ↑g k = i) Finset.univ)
k : (forget SimplexCategory).obj Y✝
a✝ : k ∈ ↑(Finset.filter (fun k => ↑g k = i) Finset.univ)
h : j ≠ k
⊢ (Disjoint on fun x => Finset.filter (fun k => ↑f k = x) Finset.univ) j k
[PROOFSTEP]
rw [Function.onFun, disjoint_iff_inf_le]
[GOAL]
case w.a.h
X✝ Y✝ Z✝ : SimplexCategory
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
h✝ :
  (forget TopCat).obj
    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)
i : (forget SimplexCategory).obj Z✝
j : (forget SimplexCategory).obj Y✝
a✝¹ : j ∈ ↑(Finset.filter (fun k => ↑g k = i) Finset.univ)
k : (forget SimplexCategory).obj Y✝
a✝ : k ∈ ↑(Finset.filter (fun k => ↑g k = i) Finset.univ)
h : j ≠ k
⊢ Finset.filter (fun k => ↑f k = j) Finset.univ ⊓ Finset.filter (fun k_1 => ↑f k_1 = k) Finset.univ ≤ ⊥
[PROOFSTEP]
intro e he
[GOAL]
case w.a.h
X✝ Y✝ Z✝ : SimplexCategory
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
h✝ :
  (forget TopCat).obj
    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)
i : (forget SimplexCategory).obj Z✝
j : (forget SimplexCategory).obj Y✝
a✝¹ : j ∈ ↑(Finset.filter (fun k => ↑g k = i) Finset.univ)
k : (forget SimplexCategory).obj Y✝
a✝ : k ∈ ↑(Finset.filter (fun k => ↑g k = i) Finset.univ)
h : j ≠ k
e : (forget SimplexCategory).obj X✝
he : e ∈ Finset.filter (fun k => ↑f k = j) Finset.univ ⊓ Finset.filter (fun k_1 => ↑f k_1 = k) Finset.univ
⊢ e ∈ ⊥
[PROOFSTEP]
simp only [Finset.bot_eq_empty, Finset.not_mem_empty]
[GOAL]
case w.a.h
X✝ Y✝ Z✝ : SimplexCategory
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
h✝ :
  (forget TopCat).obj
    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)
i : (forget SimplexCategory).obj Z✝
j : (forget SimplexCategory).obj Y✝
a✝¹ : j ∈ ↑(Finset.filter (fun k => ↑g k = i) Finset.univ)
k : (forget SimplexCategory).obj Y✝
a✝ : k ∈ ↑(Finset.filter (fun k => ↑g k = i) Finset.univ)
h : j ≠ k
e : (forget SimplexCategory).obj X✝
he : e ∈ Finset.filter (fun k => ↑f k = j) Finset.univ ⊓ Finset.filter (fun k_1 => ↑f k_1 = k) Finset.univ
⊢ False
[PROOFSTEP]
apply h
[GOAL]
case w.a.h
X✝ Y✝ Z✝ : SimplexCategory
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
h✝ :
  (forget TopCat).obj
    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)
i : (forget SimplexCategory).obj Z✝
j : (forget SimplexCategory).obj Y✝
a✝¹ : j ∈ ↑(Finset.filter (fun k => ↑g k = i) Finset.univ)
k : (forget SimplexCategory).obj Y✝
a✝ : k ∈ ↑(Finset.filter (fun k => ↑g k = i) Finset.univ)
h : j ≠ k
e : (forget SimplexCategory).obj X✝
he : e ∈ Finset.filter (fun k => ↑f k = j) Finset.univ ⊓ Finset.filter (fun k_1 => ↑f k_1 = k) Finset.univ
⊢ j = k
[PROOFSTEP]
simp only [Finset.mem_univ, forall_true_left, ge_iff_le, Finset.le_eq_subset, Finset.inf_eq_inter, Finset.mem_inter,
  Finset.mem_filter, true_and] at he
[GOAL]
case w.a.h
X✝ Y✝ Z✝ : SimplexCategory
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
h✝ :
  (forget TopCat).obj
    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)
i : (forget SimplexCategory).obj Z✝
j : (forget SimplexCategory).obj Y✝
a✝¹ : j ∈ ↑(Finset.filter (fun k => ↑g k = i) Finset.univ)
k : (forget SimplexCategory).obj Y✝
a✝ : k ∈ ↑(Finset.filter (fun k => ↑g k = i) Finset.univ)
h : j ≠ k
e : (forget SimplexCategory).obj X✝
he : ↑f e = j ∧ ↑f e = k
⊢ j = k
[PROOFSTEP]
rw [← he.1, he.2]