[GOAL]
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
⊢ fixedPoints M F = ↑(⨅ (m : M), FixedBy.subfield F m)
[PROOFSTEP]
ext z
[GOAL]
case h
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
z : F
⊢ z ∈ fixedPoints M F ↔ z ∈ ↑(⨅ (m : M), FixedBy.subfield F m)
[PROOFSTEP]
simp [fixedPoints, FixedBy.subfield, iInf, Subfield.mem_sInf]
[GOAL]
case h
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
z : F
⊢ (∀ (m : M), m • z = z) ↔
    ∀ (i : M),
      z ∈
        {
          toSubmonoid :=
            {
              toSubsemigroup :=
                { carrier := fixedBy M F i,
                  mul_mem' := (_ : ∀ {a b : F}, a ∈ fixedBy M F i → b ∈ fixedBy M F i → i • (a * b) = a * b) },
              one_mem' := (_ : i • 1 = 1) },
          add_mem' :=
            (_ :
              ∀ {a b : F},
                a ∈
                    {
                          toSubsemigroup :=
                            { carrier := fixedBy M F i,
                              mul_mem' :=
                                (_ : ∀ {a b : F}, a ∈ fixedBy M F i → b ∈ fixedBy M F i → i • (a * b) = a * b) },
                          one_mem' := (_ : i • 1 = 1) }.toSubsemigroup.carrier →
                  b ∈
                      {
                            toSubsemigroup :=
                              { carrier := fixedBy M F i,
                                mul_mem' :=
                                  (_ : ∀ {a b : F}, a ∈ fixedBy M F i → b ∈ fixedBy M F i → i • (a * b) = a * b) },
                            one_mem' := (_ : i • 1 = 1) }.toSubsemigroup.carrier →
                    i • (a + b) = a + b),
          zero_mem' := (_ : i • 0 = 0) }
[PROOFSTEP]
rfl
[GOAL]
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m g : M
x : F
hx : x ∈ subfield M F
g' : M
⊢ g' • g • x = g • x
[PROOFSTEP]
rw [hx, hx]
[GOAL]
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m✝ m : M
f : { x // x ∈ subfield M F }
f' : F
⊢ m • (↑f * f') = ↑f * m • f'
[PROOFSTEP]
rw [smul_mul', f.prop m]
[GOAL]
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m✝ m : M
p : Polynomial { x // x ∈ subfield M F }
x : { x // x ∈ subfield M F }
⊢ m • ↑Polynomial.C x = ↑Polynomial.C x
[PROOFSTEP]
rw [Polynomial.smul_C, smul]
[GOAL]
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m✝ m : M
p✝ p q : Polynomial { x // x ∈ subfield M F }
ihp : m • p = p
ihq : m • q = q
⊢ m • (p + q) = p + q
[PROOFSTEP]
rw [smul_add, ihp, ihq]
[GOAL]
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m✝ m : M
p : Polynomial { x // x ∈ subfield M F }
n : ℕ
x : { x // x ∈ subfield M F }
x✝ : m • (↑Polynomial.C x * Polynomial.X ^ n) = ↑Polynomial.C x * Polynomial.X ^ n
⊢ m • (↑Polynomial.C x * Polynomial.X ^ (n + 1)) = ↑Polynomial.C x * Polynomial.X ^ (n + 1)
[PROOFSTEP]
rw [smul_mul', Polynomial.smul_C, smul, smul_pow', Polynomial.smul_X]
[GOAL]
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
⊢ Algebra { x // x ∈ subfield M F } F
[PROOFSTEP]
infer_instance
[GOAL]
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s : Finset F
⊢ (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
[PROOFSTEP]
haveI : IsEmpty ((∅ : Finset F) : Set F) := by simp
[GOAL]
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s : Finset F
⊢ IsEmpty ↑↑∅
[PROOFSTEP]
simp
[GOAL]
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s : Finset F
this : IsEmpty ↑↑∅
⊢ (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
[PROOFSTEP]
refine' Finset.induction_on s (fun _ => linearIndependent_empty_type) fun a s has ih hs => _
[GOAL]
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : LinearIndependent { x // x ∈ subfield G F } fun i => ↑i
⊢ LinearIndependent F fun i => ↑(toFun G F) ↑i
[PROOFSTEP]
rw [coe_insert] at hs ⊢
[GOAL]
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : LinearIndependent { x // x ∈ subfield G F } fun i => ↑i
⊢ LinearIndependent F fun i => ↑(toFun G F) ↑i
[PROOFSTEP]
rw [linearIndependent_insert (mt mem_coe.1 has)] at hs
[GOAL]
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
⊢ LinearIndependent F fun i => ↑(toFun G F) ↑i
[PROOFSTEP]
rw [linearIndependent_insert' (mt mem_coe.1 has)]
[GOAL]
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
⊢ (LinearIndependent F fun x => ↑(toFun G F) ↑x) ∧ ¬↑(toFun G F) a ∈ Submodule.span F (↑(toFun G F) '' ↑s)
[PROOFSTEP]
refine' ⟨ih hs.1, fun ha => _⟩
[GOAL]
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
ha : ↑(toFun G F) a ∈ Submodule.span F (↑(toFun G F) '' ↑s)
⊢ False
[PROOFSTEP]
rw [Finsupp.mem_span_image_iff_total] at ha
[GOAL]
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
ha : ∃ l, l ∈ Finsupp.supported F F ↑s ∧ ↑(Finsupp.total F (G → F) F ↑(toFun G F)) l = ↑(toFun G F) a
⊢ False
[PROOFSTEP]
rcases ha with ⟨l, hl, hla⟩
[GOAL]
case intro.intro
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ↑(Finsupp.total F (G → F) F ↑(toFun G F)) l = ↑(toFun G F) a
⊢ False
[PROOFSTEP]
rw [Finsupp.total_apply_of_mem_supported F hl] at hla
[GOAL]
case intro.intro
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
⊢ False
[PROOFSTEP]
suffices ∀ i ∈ s, l i ∈ FixedPoints.subfield G F
  by
  replace hla := (sum_apply _ _ fun i => l i • toFun G F i).symm.trans (congr_fun hla 1)
  simp_rw [Pi.smul_apply, toFun_apply, one_smul] at hla
  refine' hs.2 (hla ▸ Submodule.sum_mem _ fun c hcs => _)
  change (⟨l c, this c hcs⟩ : FixedPoints.subfield G F) • c ∈ _
  exact Submodule.smul_mem _ _ (Submodule.subset_span <| mem_coe.2 hcs)
[GOAL]
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this✝ : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
this : ∀ (i : F), i ∈ s → ↑l i ∈ subfield G F
⊢ False
[PROOFSTEP]
replace hla := (sum_apply _ _ fun i => l i • toFun G F i).symm.trans (congr_fun hla 1)
[GOAL]
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this✝ : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
this : ∀ (i : F), i ∈ s → ↑l i ∈ subfield G F
hla : ∑ c in s, (↑l c • ↑(toFun G F) c) 1 = ↑(toFun G F) a 1
⊢ False
[PROOFSTEP]
simp_rw [Pi.smul_apply, toFun_apply, one_smul] at hla
[GOAL]
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this✝ : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
this : ∀ (i : F), i ∈ s → ↑l i ∈ subfield G F
hla : ∑ x in s, ↑l x • x = a
⊢ False
[PROOFSTEP]
refine' hs.2 (hla ▸ Submodule.sum_mem _ fun c hcs => _)
[GOAL]
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this✝ : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
this : ∀ (i : F), i ∈ s → ↑l i ∈ subfield G F
hla : ∑ x in s, ↑l x • x = a
c : F
hcs : c ∈ s
⊢ ↑l c • c ∈ Submodule.span { x // x ∈ subfield G F } ↑s
[PROOFSTEP]
change (⟨l c, this c hcs⟩ : FixedPoints.subfield G F) • c ∈ _
[GOAL]
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this✝ : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
this : ∀ (i : F), i ∈ s → ↑l i ∈ subfield G F
hla : ∑ x in s, ↑l x • x = a
c : F
hcs : c ∈ s
⊢ { val := ↑l c, property := (_ : ↑l c ∈ subfield G F) } • c ∈ Submodule.span { x // x ∈ subfield G F } ↑s
[PROOFSTEP]
exact Submodule.smul_mem _ _ (Submodule.subset_span <| mem_coe.2 hcs)
[GOAL]
case intro.intro
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
⊢ ∀ (i : F), i ∈ s → ↑l i ∈ subfield G F
[PROOFSTEP]
intro i his g
[GOAL]
case intro.intro
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g : G
⊢ g • ↑l i = ↑l i
[PROOFSTEP]
refine'
  eq_of_sub_eq_zero
    (linearIndependent_iff'.1 (ih hs.1) s.attach (fun i => g • l i - l i) _ ⟨i, his⟩ (mem_attach _ _) : _)
[GOAL]
case intro.intro
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g : G
⊢ ∑ i in attach s, (fun i => g • ↑l ↑i - ↑l ↑i) i • ↑(toFun G F) ↑i = 0
[PROOFSTEP]
refine' (@sum_attach _ _ s _ fun i => (g • l i - l i) • MulAction.toFun G F i).trans _
[GOAL]
case intro.intro
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g : G
⊢ ∑ x in s, (g • ↑l x - ↑l x) • ↑(toFun G F) x = 0
[PROOFSTEP]
ext g'
[GOAL]
case intro.intro.h
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
⊢ Finset.sum s (fun x => (g • ↑l x - ↑l x) • ↑(toFun G F) x) g' = OfNat.ofNat 0 g'
[PROOFSTEP]
dsimp only
[GOAL]
case intro.intro.h
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
⊢ Finset.sum s (fun x => (g • ↑l x - ↑l x) • ↑(toFun G F) x) g' = OfNat.ofNat 0 g'
[PROOFSTEP]
conv_lhs =>
  rw [sum_apply]
  congr
  ·skip
  · ext
    rw [Pi.smul_apply, sub_smul, smul_eq_mul]
[GOAL]
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
| Finset.sum s (fun x => (g • ↑l x - ↑l x) • ↑(toFun G F) x) g'
[PROOFSTEP]
  rw [sum_apply]
  congr
  ·skip
  · ext
    rw [Pi.smul_apply, sub_smul, smul_eq_mul]
[GOAL]
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
| Finset.sum s (fun x => (g • ↑l x - ↑l x) • ↑(toFun G F) x) g'
[PROOFSTEP]
  rw [sum_apply]
  congr
  ·skip
  · ext
    rw [Pi.smul_apply, sub_smul, smul_eq_mul]
[GOAL]
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
| Finset.sum s (fun x => (g • ↑l x - ↑l x) • ↑(toFun G F) x) g'
[PROOFSTEP]
rw [sum_apply]
[GOAL]
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
| ∑ c in s, ((g • ↑l c - ↑l c) • ↑(toFun G F) c) g'
[PROOFSTEP]
congr
[GOAL]
case s
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
| s
case f
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
| fun c => ((g • ↑l c - ↑l c) • ↑(toFun G F) c) g'
[PROOFSTEP]
·skip
[GOAL]
case s
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
| s
[PROOFSTEP]
skip
[GOAL]
case s
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
| s
[PROOFSTEP]
skip
[GOAL]
case s
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
| s
[PROOFSTEP]
skip
[GOAL]
case f
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
| fun c => ((g • ↑l c - ↑l c) • ↑(toFun G F) c) g'
[PROOFSTEP]
· ext
  rw [Pi.smul_apply, sub_smul, smul_eq_mul]
[GOAL]
case f
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
| fun c => ((g • ↑l c - ↑l c) • ↑(toFun G F) c) g'
[PROOFSTEP]
  ext
  rw [Pi.smul_apply, sub_smul, smul_eq_mul]
[GOAL]
case f
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
| fun c => ((g • ↑l c - ↑l c) • ↑(toFun G F) c) g'
[PROOFSTEP]
  ext
  rw [Pi.smul_apply, sub_smul, smul_eq_mul]
[GOAL]
case f
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
| fun c => ((g • ↑l c - ↑l c) • ↑(toFun G F) c) g'
[PROOFSTEP]
ext
[GOAL]
case f.h
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
x✝ : F
| ((g • ↑l x✝ - ↑l x✝) • ↑(toFun G F) x✝) g'
[PROOFSTEP]
rw [Pi.smul_apply, sub_smul, smul_eq_mul]
[GOAL]
case intro.intro.h
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
⊢ ∑ x in s, (g • ↑l x * ↑(toFun G F) x g' - ↑l x • ↑(toFun G F) x g') = OfNat.ofNat 0 g'
[PROOFSTEP]
rw [sum_sub_distrib, Pi.zero_apply, sub_eq_zero]
[GOAL]
case intro.intro.h
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
⊢ ∑ x in s, g • ↑l x * ↑(toFun G F) x g' = ∑ x in s, ↑l x • ↑(toFun G F) x g'
[PROOFSTEP]
conv_lhs =>
  congr
  ·skip
  · ext x
    rw [toFun_apply, ← mul_inv_cancel_left g g', mul_smul, ← smul_mul', ← toFun_apply _ x]
[GOAL]
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
| ∑ x in s, g • ↑l x * ↑(toFun G F) x g'
[PROOFSTEP]
  congr
  ·skip
  · ext x
    rw [toFun_apply, ← mul_inv_cancel_left g g', mul_smul, ← smul_mul', ← toFun_apply _ x]
[GOAL]
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
| ∑ x in s, g • ↑l x * ↑(toFun G F) x g'
[PROOFSTEP]
  congr
  ·skip
  · ext x
    rw [toFun_apply, ← mul_inv_cancel_left g g', mul_smul, ← smul_mul', ← toFun_apply _ x]
[GOAL]
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
| ∑ x in s, g • ↑l x * ↑(toFun G F) x g'
[PROOFSTEP]
congr
[GOAL]
case s
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
| s
case f
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
| fun x => g • ↑l x * ↑(toFun G F) x g'
[PROOFSTEP]
·skip
[GOAL]
case s
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
| s
[PROOFSTEP]
skip
[GOAL]
case s
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
| s
[PROOFSTEP]
skip
[GOAL]
case s
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
| s
[PROOFSTEP]
skip
[GOAL]
case f
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
| fun x => g • ↑l x * ↑(toFun G F) x g'
[PROOFSTEP]
· ext x
  rw [toFun_apply, ← mul_inv_cancel_left g g', mul_smul, ← smul_mul', ← toFun_apply _ x]
[GOAL]
case f
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
| fun x => g • ↑l x * ↑(toFun G F) x g'
[PROOFSTEP]
  ext x
  rw [toFun_apply, ← mul_inv_cancel_left g g', mul_smul, ← smul_mul', ← toFun_apply _ x]
[GOAL]
case f
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
| fun x => g • ↑l x * ↑(toFun G F) x g'
[PROOFSTEP]
  ext x
  rw [toFun_apply, ← mul_inv_cancel_left g g', mul_smul, ← smul_mul', ← toFun_apply _ x]
[GOAL]
case f
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
| fun x => g • ↑l x * ↑(toFun G F) x g'
[PROOFSTEP]
ext x
[GOAL]
case f.h
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
x : F
| g • ↑l x * ↑(toFun G F) x g'
[PROOFSTEP]
rw [toFun_apply, ← mul_inv_cancel_left g g', mul_smul, ← smul_mul', ← toFun_apply _ x]
[GOAL]
case intro.intro.h
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
⊢ ∑ x in s, g • (↑l x * ↑(toFun G F) x (g⁻¹ * g')) = ∑ x in s, ↑l x • ↑(toFun G F) x g'
[PROOFSTEP]
show
  (∑ x in s, g • (fun y => l y • MulAction.toFun G F y) x (g⁻¹ * g')) =
    ∑ x in s, (fun y => l y • MulAction.toFun G F y) x g'
[GOAL]
case intro.intro.h
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
⊢ ∑ x in s, g • (fun y => ↑l y • ↑(toFun G F) y) x (g⁻¹ * g') = ∑ x in s, (fun y => ↑l y • ↑(toFun G F) y) x g'
[PROOFSTEP]
rw [← smul_sum, ← sum_apply _ _ fun y => l y • toFun G F y, ← sum_apply _ _ fun y => l y • toFun G F y]
[GOAL]
case intro.intro.h
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
⊢ g • Finset.sum s (fun c => ↑l c • ↑(toFun G F) c) (g⁻¹ * g') = Finset.sum s (fun c => ↑l c • ↑(toFun G F) c) g'
[PROOFSTEP]
dsimp only
[GOAL]
case intro.intro.h
M : Type u
inst✝⁴ : Monoid M
G : Type u
inst✝³ : Group G
F : Type v
inst✝² : Field F
inst✝¹ : MulSemiringAction M F
inst✝ : MulSemiringAction G F
m : M
s✝ : Finset F
this : IsEmpty ↑↑∅
a : F
s : Finset F
has : ¬a ∈ s
ih : (LinearIndependent { x // x ∈ subfield G F } fun i => ↑i) → LinearIndependent F fun i => ↑(toFun G F) ↑i
hs : (LinearIndependent { x // x ∈ subfield G F } fun b => ↑b) ∧ ¬a ∈ Submodule.span { x // x ∈ subfield G F } ↑s
l : F →₀ F
hl : l ∈ Finsupp.supported F F ↑s
hla : ∑ i in s, ↑l i • ↑(toFun G F) i = ↑(toFun G F) a
i : F
his : i ∈ s
g g' : G
⊢ g • Finset.sum s (fun c => ↑l c • ↑(toFun G F) c) (g⁻¹ * g') = Finset.sum s (fun c => ↑l c • ↑(toFun G F) c) g'
[PROOFSTEP]
rw [hla, toFun_apply, toFun_apply, smul_smul, mul_inv_cancel_left]
[GOAL]
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
x : F
⊢ Polynomial.Monic (minpoly G F x)
[PROOFSTEP]
simp only [minpoly, Polynomial.monic_toSubring]
[GOAL]
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
x : F
⊢ Polynomial.Monic (prodXSubSmul G F x)
[PROOFSTEP]
exact prodXSubSmul.monic G F x
[GOAL]
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
x : F
⊢ Polynomial.eval₂ (Subring.subtype (subfield G F).toSubring) x (minpoly G F x) = 0
[PROOFSTEP]
rw [← prodXSubSmul.eval G F x, Polynomial.eval₂_eq_eval_map]
[GOAL]
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
x : F
⊢ Polynomial.eval x (Polynomial.map (Subring.subtype (subfield G F).toSubring) (minpoly G F x)) =
    Polynomial.eval x (prodXSubSmul G F x)
[PROOFSTEP]
simp only [minpoly, Polynomial.map_toSubring]
[GOAL]
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
x : F
H : minpoly G F x = 1
this : Polynomial.eval₂ (Subring.subtype (subfield G F).toSubring) x (minpoly G F x) = 0
⊢ 1 = 0
[PROOFSTEP]
rwa [H, Polynomial.eval₂_one] at this
[GOAL]
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
x : F
f : Polynomial { x // x ∈ subfield G F }
hf : Polynomial.eval₂ (Subfield.subtype (subfield G F)) x f = 0
⊢ minpoly G F x ∣ f
[PROOFSTEP]
have : (subfield G F).subtype = (subfield G F).toSubring.subtype := rfl
[GOAL]
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
x : F
f : Polynomial { x // x ∈ subfield G F }
hf : Polynomial.eval₂ (Subfield.subtype (subfield G F)) x f = 0
this : Subfield.subtype (subfield G F) = Subring.subtype (subfield G F).toSubring
⊢ minpoly G F x ∣ f
[PROOFSTEP]
have h :
  Polynomial.map (MulSemiringActionHom.toRingHom (IsInvariantSubring.subtypeHom G (subfield G F).toSubring)) f =
    Polynomial.map ((IsInvariantSubring.subtypeHom G (subfield G F).toSubring)) f :=
  rfl
[GOAL]
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
x : F
f : Polynomial { x // x ∈ subfield G F }
hf : Polynomial.eval₂ (Subfield.subtype (subfield G F)) x f = 0
this : Subfield.subtype (subfield G F) = Subring.subtype (subfield G F).toSubring
h :
  Polynomial.map (MulSemiringActionHom.toRingHom (IsInvariantSubring.subtypeHom G (subfield G F).toSubring)) f =
    Polynomial.map (↑(IsInvariantSubring.subtypeHom G (subfield G F).toSubring)) f
⊢ minpoly G F x ∣ f
[PROOFSTEP]
erw [← Polynomial.map_dvd_map' (Subfield.subtype <| FixedPoints.subfield G F), minpoly, this,
  Polynomial.map_toSubring _ _, prodXSubSmul]
[GOAL]
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
x : F
f : Polynomial { x // x ∈ subfield G F }
hf : Polynomial.eval₂ (Subfield.subtype (subfield G F)) x f = 0
this : Subfield.subtype (subfield G F) = Subring.subtype (subfield G F).toSubring
h :
  Polynomial.map (MulSemiringActionHom.toRingHom (IsInvariantSubring.subtypeHom G (subfield G F).toSubring)) f =
    Polynomial.map (↑(IsInvariantSubring.subtypeHom G (subfield G F).toSubring)) f
⊢ ∏ g : G ⧸ stabilizer G x, (Polynomial.X - ↑Polynomial.C (ofQuotientStabilizer G x g)) ∣
    Polynomial.map (Subring.subtype (subfield G F).toSubring) f
[PROOFSTEP]
refine'
  Fintype.prod_dvd_of_coprime (Polynomial.pairwise_coprime_X_sub_C <| MulAction.injective_ofQuotientStabilizer G x)
    fun y => QuotientGroup.induction_on y fun g => _
[GOAL]
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
x : F
f : Polynomial { x // x ∈ subfield G F }
hf : Polynomial.eval₂ (Subfield.subtype (subfield G F)) x f = 0
this : Subfield.subtype (subfield G F) = Subring.subtype (subfield G F).toSubring
h :
  Polynomial.map (MulSemiringActionHom.toRingHom (IsInvariantSubring.subtypeHom G (subfield G F).toSubring)) f =
    Polynomial.map (↑(IsInvariantSubring.subtypeHom G (subfield G F).toSubring)) f
y : G ⧸ stabilizer G x
g : G
⊢ Polynomial.X - ↑Polynomial.C (ofQuotientStabilizer G x ↑g) ∣
    Polynomial.map (Subring.subtype (subfield G F).toSubring) f
[PROOFSTEP]
rw [Polynomial.dvd_iff_isRoot, Polynomial.IsRoot.def, MulAction.ofQuotientStabilizer_mk, Polynomial.eval_smul', ← this,
  ← Subfield.toSubring_subtype_eq_subtype, ← IsInvariantSubring.coe_subtypeHom' G (FixedPoints.subfield G F).toSubring,
  h, ← MulSemiringActionHom.coe_polynomial, ← MulSemiringActionHom.map_smul, smul_polynomial,
  MulSemiringActionHom.coe_polynomial, ← h, IsInvariantSubring.coe_subtypeHom', Polynomial.eval_map,
  Subfield.toSubring_subtype_eq_subtype, hf, smul_zero]
[GOAL]
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
x : F
f g : Polynomial { x // x ∈ subfield G F }
hf : Polynomial.Monic f
hg : Polynomial.Monic g
hfg : f * g = minpoly G F x
⊢ f = 1 ∨ g = 1
[PROOFSTEP]
have hf2 : f ∣ minpoly G F x := by rw [← hfg]; exact dvd_mul_right _ _
[GOAL]
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
x : F
f g : Polynomial { x // x ∈ subfield G F }
hf : Polynomial.Monic f
hg : Polynomial.Monic g
hfg : f * g = minpoly G F x
⊢ f ∣ minpoly G F x
[PROOFSTEP]
rw [← hfg]
[GOAL]
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
x : F
f g : Polynomial { x // x ∈ subfield G F }
hf : Polynomial.Monic f
hg : Polynomial.Monic g
hfg : f * g = minpoly G F x
⊢ f ∣ f * g
[PROOFSTEP]
exact dvd_mul_right _ _
[GOAL]
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
x : F
f g : Polynomial { x // x ∈ subfield G F }
hf : Polynomial.Monic f
hg : Polynomial.Monic g
hfg : f * g = minpoly G F x
hf2 : f ∣ minpoly G F x
⊢ f = 1 ∨ g = 1
[PROOFSTEP]
have hg2 : g ∣ minpoly G F x := by rw [← hfg]; exact dvd_mul_left _ _
[GOAL]
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
x : F
f g : Polynomial { x // x ∈ subfield G F }
hf : Polynomial.Monic f
hg : Polynomial.Monic g
hfg : f * g = minpoly G F x
hf2 : f ∣ minpoly G F x
⊢ g ∣ minpoly G F x
[PROOFSTEP]
rw [← hfg]
[GOAL]
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
x : F
f g : Polynomial { x // x ∈ subfield G F }
hf : Polynomial.Monic f
hg : Polynomial.Monic g
hfg : f * g = minpoly G F x
hf2 : f ∣ minpoly G F x
⊢ g ∣ f * g
[PROOFSTEP]
exact dvd_mul_left _ _
[GOAL]
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
x : F
f g : Polynomial { x // x ∈ subfield G F }
hf : Polynomial.Monic f
hg : Polynomial.Monic g
hfg : f * g = minpoly G F x
hf2 : f ∣ minpoly G F x
hg2 : g ∣ minpoly G F x
⊢ f = 1 ∨ g = 1
[PROOFSTEP]
have := eval₂ G F x
[GOAL]
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
x : F
f g : Polynomial { x // x ∈ subfield G F }
hf : Polynomial.Monic f
hg : Polynomial.Monic g
hfg : f * g = minpoly G F x
hf2 : f ∣ minpoly G F x
hg2 : g ∣ minpoly G F x
this : Polynomial.eval₂ (Subring.subtype (subfield G F).toSubring) x (minpoly G F x) = 0
⊢ f = 1 ∨ g = 1
[PROOFSTEP]
rw [← hfg, Polynomial.eval₂_mul, mul_eq_zero] at this
[GOAL]
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
x : F
f g : Polynomial { x // x ∈ subfield G F }
hf : Polynomial.Monic f
hg : Polynomial.Monic g
hfg : f * g = minpoly G F x
hf2 : f ∣ minpoly G F x
hg2 : g ∣ minpoly G F x
this :
  Polynomial.eval₂ (Subring.subtype (subfield G F).toSubring) x f = 0 ∨
    Polynomial.eval₂ (Subring.subtype (subfield G F).toSubring) x g = 0
⊢ f = 1 ∨ g = 1
[PROOFSTEP]
cases' this with this this
[GOAL]
case inl
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
x : F
f g : Polynomial { x // x ∈ subfield G F }
hf : Polynomial.Monic f
hg : Polynomial.Monic g
hfg : f * g = minpoly G F x
hf2 : f ∣ minpoly G F x
hg2 : g ∣ minpoly G F x
this : Polynomial.eval₂ (Subring.subtype (subfield G F).toSubring) x f = 0
⊢ f = 1 ∨ g = 1
[PROOFSTEP]
right
[GOAL]
case inl.h
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
x : F
f g : Polynomial { x // x ∈ subfield G F }
hf : Polynomial.Monic f
hg : Polynomial.Monic g
hfg : f * g = minpoly G F x
hf2 : f ∣ minpoly G F x
hg2 : g ∣ minpoly G F x
this : Polynomial.eval₂ (Subring.subtype (subfield G F).toSubring) x f = 0
⊢ g = 1
[PROOFSTEP]
have hf3 : f = minpoly G F x :=
  Polynomial.eq_of_monic_of_associated hf (monic G F x) (associated_of_dvd_dvd hf2 <| @of_eval₂ G _ F _ _ _ x f this)
[GOAL]
case inl.h
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
x : F
f g : Polynomial { x // x ∈ subfield G F }
hf : Polynomial.Monic f
hg : Polynomial.Monic g
hfg : f * g = minpoly G F x
hf2 : f ∣ minpoly G F x
hg2 : g ∣ minpoly G F x
this : Polynomial.eval₂ (Subring.subtype (subfield G F).toSubring) x f = 0
hf3 : f = minpoly G F x
⊢ g = 1
[PROOFSTEP]
rwa [← mul_one (minpoly G F x), hf3, mul_right_inj' (monic G F x).ne_zero] at hfg
[GOAL]
case inr
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
x : F
f g : Polynomial { x // x ∈ subfield G F }
hf : Polynomial.Monic f
hg : Polynomial.Monic g
hfg : f * g = minpoly G F x
hf2 : f ∣ minpoly G F x
hg2 : g ∣ minpoly G F x
this : Polynomial.eval₂ (Subring.subtype (subfield G F).toSubring) x g = 0
⊢ f = 1 ∨ g = 1
[PROOFSTEP]
left
[GOAL]
case inr.h
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
x : F
f g : Polynomial { x // x ∈ subfield G F }
hf : Polynomial.Monic f
hg : Polynomial.Monic g
hfg : f * g = minpoly G F x
hf2 : f ∣ minpoly G F x
hg2 : g ∣ minpoly G F x
this : Polynomial.eval₂ (Subring.subtype (subfield G F).toSubring) x g = 0
⊢ f = 1
[PROOFSTEP]
have hg3 : g = minpoly G F x :=
  Polynomial.eq_of_monic_of_associated hg (monic G F x) (associated_of_dvd_dvd hg2 <| @of_eval₂ G _ F _ _ _ x g this)
[GOAL]
case inr.h
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
x : F
f g : Polynomial { x // x ∈ subfield G F }
hf : Polynomial.Monic f
hg : Polynomial.Monic g
hfg : f * g = minpoly G F x
hf2 : f ∣ minpoly G F x
hg2 : g ∣ minpoly G F x
this : Polynomial.eval₂ (Subring.subtype (subfield G F).toSubring) x g = 0
hg3 : g = minpoly G F x
⊢ f = 1
[PROOFSTEP]
rwa [← one_mul (minpoly G F x), hg3, mul_left_inj' (monic G F x).ne_zero] at hfg
[GOAL]
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Finite G
x : F
⊢ IsIntegral { x // x ∈ subfield G F } x
[PROOFSTEP]
cases nonempty_fintype G
[GOAL]
case intro
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Finite G
x : F
val✝ : Fintype G
⊢ IsIntegral { x // x ∈ subfield G F } x
[PROOFSTEP]
exact ⟨minpoly G F x, minpoly.monic G F x, minpoly.eval₂ G F x⟩
[GOAL]
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
x : F
s : Finset F
hs : LinearIndependent { x // x ∈ subfield G F } fun i => ↑i
⊢ card s ≤ Fintype.card G
[PROOFSTEP]
simpa only [rank_fun', Cardinal.mk_coe_finset, Finset.coe_sort_coe, Cardinal.lift_natCast, Cardinal.natCast_le] using
  cardinal_lift_le_rank_of_linearIndependent' (linearIndependent_smul_of_linearIndependent G F hs)
[GOAL]
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Finite G
x : F
⊢ Polynomial.Splits (RingHom.id F)
    (Polynomial.map (algebraMap { x // x ∈ subfield G F } F) (_root_.minpoly { x // x ∈ subfield G F } x))
[PROOFSTEP]
cases nonempty_fintype G
[GOAL]
case intro
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Finite G
x : F
val✝ : Fintype G
⊢ Polynomial.Splits (RingHom.id F)
    (Polynomial.map (algebraMap { x // x ∈ subfield G F } F) (_root_.minpoly { x // x ∈ subfield G F } x))
[PROOFSTEP]
rw [← minpoly_eq_minpoly, minpoly, coe_algebraMap, ← Subfield.toSubring_subtype_eq_subtype,
  Polynomial.map_toSubring _ (subfield G F).toSubring, prodXSubSmul]
[GOAL]
case intro
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Finite G
x : F
val✝ : Fintype G
⊢ Polynomial.Splits (RingHom.id F)
    (∏ g : G ⧸ stabilizer G x, (Polynomial.X - ↑Polynomial.C (ofQuotientStabilizer G x g)))
[PROOFSTEP]
exact Polynomial.splits_prod _ fun _ _ => Polynomial.splits_X_sub_C _
[GOAL]
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Finite G
x : F
⊢ Polynomial.Separable (_root_.minpoly { x // x ∈ subfield G F } x)
[PROOFSTEP]
cases nonempty_fintype G
[GOAL]
case intro
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Finite G
x : F
val✝ : Fintype G
⊢ Polynomial.Separable (_root_.minpoly { x // x ∈ subfield G F } x)
[PROOFSTEP]
erw [← minpoly_eq_minpoly, ← Polynomial.separable_map (FixedPoints.subfield G F).subtype, minpoly,
  Polynomial.map_toSubring _ (subfield G F).toSubring]
[GOAL]
case intro
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Finite G
x : F
val✝ : Fintype G
⊢ Polynomial.Separable (prodXSubSmul G F x)
[PROOFSTEP]
exact Polynomial.separable_prod_X_sub_C_iff.2 (injective_ofQuotientStabilizer G x)
[GOAL]
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Finite G
⊢ FiniteDimensional { x // x ∈ subfield G F } F
[PROOFSTEP]
cases nonempty_fintype G
[GOAL]
case intro
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Finite G
val✝ : Fintype G
⊢ FiniteDimensional { x // x ∈ subfield G F } F
[PROOFSTEP]
exact
  IsNoetherian.iff_fg.1 (IsNoetherian.iff_rank_lt_aleph0.2 <| (rank_le_card G F).trans_lt <| Cardinal.nat_lt_aleph0 _)
[GOAL]
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
⊢ finrank { x // x ∈ subfield G F } F ≤ Fintype.card G
[PROOFSTEP]
rw [← Cardinal.natCast_le, finrank_eq_rank]
[GOAL]
M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
⊢ Module.rank { x // x ∈ subfield G F } F ≤ ↑(Fintype.card G)
[PROOFSTEP]
apply rank_le_card
[GOAL]
M : Type u
inst✝⁹ : Monoid M
G✝ : Type u
inst✝⁸ : Group G✝
F✝ : Type v
inst✝⁷ : Field F✝
inst✝⁶ : MulSemiringAction M F✝
inst✝⁵ : MulSemiringAction G✝ F✝
m : M
G : Type u
F : Type v
inst✝⁴ : Group G
inst✝³ : Field F
inst✝² : Finite G
inst✝¹ : MulSemiringAction G F
inst✝ : FaithfulSMul G F
⊢ Function.Bijective (MulSemiringAction.toAlgHom { x // x ∈ subfield G F } F)
[PROOFSTEP]
cases nonempty_fintype G
[GOAL]
case intro
M : Type u
inst✝⁹ : Monoid M
G✝ : Type u
inst✝⁸ : Group G✝
F✝ : Type v
inst✝⁷ : Field F✝
inst✝⁶ : MulSemiringAction M F✝
inst✝⁵ : MulSemiringAction G✝ F✝
m : M
G : Type u
F : Type v
inst✝⁴ : Group G
inst✝³ : Field F
inst✝² : Finite G
inst✝¹ : MulSemiringAction G F
inst✝ : FaithfulSMul G F
val✝ : Fintype G
⊢ Function.Bijective (MulSemiringAction.toAlgHom { x // x ∈ subfield G F } F)
[PROOFSTEP]
rw [Fintype.bijective_iff_injective_and_card]
[GOAL]
case intro
M : Type u
inst✝⁹ : Monoid M
G✝ : Type u
inst✝⁸ : Group G✝
F✝ : Type v
inst✝⁷ : Field F✝
inst✝⁶ : MulSemiringAction M F✝
inst✝⁵ : MulSemiringAction G✝ F✝
m : M
G : Type u
F : Type v
inst✝⁴ : Group G
inst✝³ : Field F
inst✝² : Finite G
inst✝¹ : MulSemiringAction G F
inst✝ : FaithfulSMul G F
val✝ : Fintype G
⊢ Function.Injective (MulSemiringAction.toAlgHom { x // x ∈ subfield G F } F) ∧
    Fintype.card G = Fintype.card (F →ₐ[{ x // x ∈ subfield G F }] F)
[PROOFSTEP]
constructor
[GOAL]
case intro.left
M : Type u
inst✝⁹ : Monoid M
G✝ : Type u
inst✝⁸ : Group G✝
F✝ : Type v
inst✝⁷ : Field F✝
inst✝⁶ : MulSemiringAction M F✝
inst✝⁵ : MulSemiringAction G✝ F✝
m : M
G : Type u
F : Type v
inst✝⁴ : Group G
inst✝³ : Field F
inst✝² : Finite G
inst✝¹ : MulSemiringAction G F
inst✝ : FaithfulSMul G F
val✝ : Fintype G
⊢ Function.Injective (MulSemiringAction.toAlgHom { x // x ∈ subfield G F } F)
[PROOFSTEP]
exact MulSemiringAction.toAlgHom_injective _ F
[GOAL]
case intro.right
M : Type u
inst✝⁹ : Monoid M
G✝ : Type u
inst✝⁸ : Group G✝
F✝ : Type v
inst✝⁷ : Field F✝
inst✝⁶ : MulSemiringAction M F✝
inst✝⁵ : MulSemiringAction G✝ F✝
m : M
G : Type u
F : Type v
inst✝⁴ : Group G
inst✝³ : Field F
inst✝² : Finite G
inst✝¹ : MulSemiringAction G F
inst✝ : FaithfulSMul G F
val✝ : Fintype G
⊢ Fintype.card G = Fintype.card (F →ₐ[{ x // x ∈ subfield G F }] F)
[PROOFSTEP]
apply le_antisymm
[GOAL]
case intro.right.a
M : Type u
inst✝⁹ : Monoid M
G✝ : Type u
inst✝⁸ : Group G✝
F✝ : Type v
inst✝⁷ : Field F✝
inst✝⁶ : MulSemiringAction M F✝
inst✝⁵ : MulSemiringAction G✝ F✝
m : M
G : Type u
F : Type v
inst✝⁴ : Group G
inst✝³ : Field F
inst✝² : Finite G
inst✝¹ : MulSemiringAction G F
inst✝ : FaithfulSMul G F
val✝ : Fintype G
⊢ Fintype.card G ≤ Fintype.card (F →ₐ[{ x // x ∈ subfield G F }] F)
[PROOFSTEP]
exact Fintype.card_le_of_injective _ (MulSemiringAction.toAlgHom_injective _ F)
[GOAL]
case intro.right.a
M : Type u
inst✝⁹ : Monoid M
G✝ : Type u
inst✝⁸ : Group G✝
F✝ : Type v
inst✝⁷ : Field F✝
inst✝⁶ : MulSemiringAction M F✝
inst✝⁵ : MulSemiringAction G✝ F✝
m : M
G : Type u
F : Type v
inst✝⁴ : Group G
inst✝³ : Field F
inst✝² : Finite G
inst✝¹ : MulSemiringAction G F
inst✝ : FaithfulSMul G F
val✝ : Fintype G
⊢ Fintype.card (F →ₐ[{ x // x ∈ subfield G F }] F) ≤ Fintype.card G
[PROOFSTEP]
rw [← finrank_eq_card G F]
[GOAL]
case intro.right.a
M : Type u
inst✝⁹ : Monoid M
G✝ : Type u
inst✝⁸ : Group G✝
F✝ : Type v
inst✝⁷ : Field F✝
inst✝⁶ : MulSemiringAction M F✝
inst✝⁵ : MulSemiringAction G✝ F✝
m : M
G : Type u
F : Type v
inst✝⁴ : Group G
inst✝³ : Field F
inst✝² : Finite G
inst✝¹ : MulSemiringAction G F
inst✝ : FaithfulSMul G F
val✝ : Fintype G
⊢ Fintype.card (F →ₐ[{ x // x ∈ subfield G F }] F) ≤ finrank { x // x ∈ subfield G F } F
[PROOFSTEP]
exact LE.le.trans_eq (finrank_algHom _ F) (finrank_linear_map' _ _ _)


[GOAL]
m n : ℕ
hne : m ≠ n
⊢ ↑m ≠ ↑n
[PROOFSTEP]
exact_mod_cast hne
[GOAL]
x : ℕ
r : ℝ
⊢ closedBall x r = Icc ⌈↑x - r⌉₊ ⌊↑x + r⌋₊
[PROOFSTEP]
rcases le_or_lt 0 r with (hr | hr)
[GOAL]
case inl
x : ℕ
r : ℝ
hr : 0 ≤ r
⊢ closedBall x r = Icc ⌈↑x - r⌉₊ ⌊↑x + r⌋₊
[PROOFSTEP]
rw [← preimage_closedBall, Real.closedBall_eq_Icc, preimage_Icc]
[GOAL]
case inl
x : ℕ
r : ℝ
hr : 0 ≤ r
⊢ 0 ≤ ↑x + r
[PROOFSTEP]
exact add_nonneg (cast_nonneg x) hr
[GOAL]
case inr
x : ℕ
r : ℝ
hr : r < 0
⊢ closedBall x r = Icc ⌈↑x - r⌉₊ ⌊↑x + r⌋₊
[PROOFSTEP]
rw [closedBall_eq_empty.2 hr, Icc_eq_empty_of_lt]
[GOAL]
case inr
x : ℕ
r : ℝ
hr : r < 0
⊢ ⌊↑x + r⌋₊ < ⌈↑x - r⌉₊
[PROOFSTEP]
calc
  ⌊(x : ℝ) + r⌋₊ ≤ ⌊(x : ℝ)⌋₊ := floor_mono <| by linarith
  _ < ⌈↑x - r⌉₊ := by
    rw [floor_coe, Nat.lt_ceil]
    linarith
[GOAL]
x : ℕ
r : ℝ
hr : r < 0
⊢ ↑x + r ≤ ↑x
[PROOFSTEP]
linarith
[GOAL]
x : ℕ
r : ℝ
hr : r < 0
⊢ ⌊↑x⌋₊ < ⌈↑x - r⌉₊
[PROOFSTEP]
rw [floor_coe, Nat.lt_ceil]
[GOAL]
x : ℕ
r : ℝ
hr : r < 0
⊢ ↑x < ↑x - r
[PROOFSTEP]
linarith
[GOAL]
x : ℕ
r : ℝ
⊢ IsCompact (closedBall x r)
[PROOFSTEP]
rw [closedBall_eq_Icc]
[GOAL]
x : ℕ
r : ℝ
⊢ IsCompact (Icc ⌈↑x - r⌉₊ ⌊↑x + r⌋₊)
[PROOFSTEP]
exact (Set.finite_Icc _ _).isCompact
[GOAL]
⊢ NeBot (cocompact ℕ)
[PROOFSTEP]
simp [Filter.atTop_neBot]


[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝ : Monoid α
s✝ t : Set α
a✝ : α
m n : ℕ
a : α
s : Fin n → Set α
⊢ a ∈ List.prod (List.ofFn s) ↔ ∃ f, List.prod (List.ofFn fun i => ↑(f i)) = a
[PROOFSTEP]
induction' n with n ih generalizing a
[GOAL]
case zero
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝ : Monoid α
s✝¹ t : Set α
a✝¹ : α
m n : ℕ
a✝ : α
s✝ : Fin n → Set α
a : α
s : Fin Nat.zero → Set α
⊢ a ∈ List.prod (List.ofFn s) ↔ ∃ f, List.prod (List.ofFn fun i => ↑(f i)) = a
[PROOFSTEP]
simp_rw [List.ofFn_zero, List.prod_nil, Fin.exists_fin_zero_pi, eq_comm, Set.mem_one]
[GOAL]
case succ
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝ : Monoid α
s✝¹ t : Set α
a✝¹ : α
m n✝ : ℕ
a✝ : α
s✝ : Fin n✝ → Set α
n : ℕ
ih : ∀ {a : α} {s : Fin n → Set α}, a ∈ List.prod (List.ofFn s) ↔ ∃ f, List.prod (List.ofFn fun i => ↑(f i)) = a
a : α
s : Fin (Nat.succ n) → Set α
⊢ a ∈ List.prod (List.ofFn s) ↔ ∃ f, List.prod (List.ofFn fun i => ↑(f i)) = a
[PROOFSTEP]
simp_rw [List.ofFn_succ, List.prod_cons, Fin.exists_fin_succ_pi, Fin.cons_zero, Fin.cons_succ, mem_mul, @ih,
  exists_and_left, exists_exists_eq_and, SetCoe.exists, exists_prop]
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝ : Monoid α
s t : Set α
a✝ : α
m n : ℕ
l : List (Set α)
a : α
⊢ a ∈ List.prod l ↔ ∃ l', List.prod (List.map (fun x => ↑x.snd) l') = a ∧ List.map Sigma.fst l' = l
[PROOFSTEP]
induction' l using List.ofFnRec with n f
[GOAL]
case h
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝ : Monoid α
s t : Set α
a✝ : α
m n✝ : ℕ
a : α
n : ℕ
f : Fin n → Set α
⊢ a ∈ List.prod (List.ofFn f) ↔
    ∃ l', List.prod (List.map (fun x => ↑x.snd) l') = a ∧ List.map Sigma.fst l' = List.ofFn f
[PROOFSTEP]
simp only [mem_prod_list_ofFn, List.exists_iff_exists_tuple, List.map_ofFn, Function.comp, List.ofFn_inj',
  Sigma.mk.inj_iff, and_left_comm, exists_and_left, exists_eq_left, heq_eq_eq]
[GOAL]
case h
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝ : Monoid α
s t : Set α
a✝ : α
m n✝ : ℕ
a : α
n : ℕ
f : Fin n → Set α
⊢ (∃ f_1, List.prod (List.ofFn fun i => ↑(f_1 i)) = a) ↔
    ∃ x, List.prod (List.ofFn fun x_1 => ↑(x x_1).snd) = a ∧ (fun x_1 => (x x_1).fst) = f
[PROOFSTEP]
constructor
[GOAL]
case h.mp
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝ : Monoid α
s t : Set α
a✝ : α
m n✝ : ℕ
a : α
n : ℕ
f : Fin n → Set α
⊢ (∃ f_1, List.prod (List.ofFn fun i => ↑(f_1 i)) = a) →
    ∃ x, List.prod (List.ofFn fun x_1 => ↑(x x_1).snd) = a ∧ (fun x_1 => (x x_1).fst) = f
[PROOFSTEP]
rintro ⟨fi, rfl⟩
[GOAL]
case h.mp.intro
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝ : Monoid α
s t : Set α
a : α
m n✝ n : ℕ
f : Fin n → Set α
fi : (i : Fin n) → ↑(f i)
⊢ ∃ x,
    List.prod (List.ofFn fun x_1 => ↑(x x_1).snd) = List.prod (List.ofFn fun i => ↑(fi i)) ∧
      (fun x_1 => (x x_1).fst) = f
[PROOFSTEP]
exact ⟨fun i ↦ ⟨_, fi i⟩, rfl, rfl⟩
[GOAL]
case h.mpr
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝ : Monoid α
s t : Set α
a✝ : α
m n✝ : ℕ
a : α
n : ℕ
f : Fin n → Set α
⊢ (∃ x, List.prod (List.ofFn fun x_1 => ↑(x x_1).snd) = a ∧ (fun x_1 => (x x_1).fst) = f) →
    ∃ f_1, List.prod (List.ofFn fun i => ↑(f_1 i)) = a
[PROOFSTEP]
rintro ⟨fi, rfl, rfl⟩
[GOAL]
case h.mpr.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝ : Monoid α
s t : Set α
a : α
m n✝ n : ℕ
fi : Fin n → (s : Set α) × ↑s
⊢ ∃ f, List.prod (List.ofFn fun i => ↑(f i)) = List.prod (List.ofFn fun x => ↑(fi x).snd)
[PROOFSTEP]
exact ⟨fun i ↦ _, rfl⟩
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝ : Monoid α
s t : Set α
a✝ : α
m n✝ : ℕ
a : α
n : ℕ
⊢ a ∈ s ^ n ↔ ∃ f, List.prod (List.ofFn fun i => ↑(f i)) = a
[PROOFSTEP]
rw [← mem_prod_list_ofFn, List.ofFn_const, List.prod_replicate]


[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
⊢ StrictConcaveOn ℝ≥0 univ fun x => x ^ p
[PROOFSTEP]
have hp₀' : 0 < 1 / p := by positivity
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
⊢ 0 < 1 / p
[PROOFSTEP]
positivity
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
hp₀' : 0 < 1 / p
⊢ StrictConcaveOn ℝ≥0 univ fun x => x ^ p
[PROOFSTEP]
have hp₁' : 1 < 1 / p := by rw [one_lt_div hp₀]; exact hp₁
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
hp₀' : 0 < 1 / p
⊢ 1 < 1 / p
[PROOFSTEP]
rw [one_lt_div hp₀]
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
hp₀' : 0 < 1 / p
⊢ p < 1
[PROOFSTEP]
exact hp₁
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
hp₀' : 0 < 1 / p
hp₁' : 1 < 1 / p
⊢ StrictConcaveOn ℝ≥0 univ fun x => x ^ p
[PROOFSTEP]
let f := NNReal.orderIsoRpow (1 / p) hp₀'
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
hp₀' : 0 < 1 / p
hp₁' : 1 < 1 / p
f : ℝ≥0 ≃o ℝ≥0 := orderIsoRpow (1 / p) hp₀'
⊢ StrictConcaveOn ℝ≥0 univ fun x => x ^ p
[PROOFSTEP]
have h₁ : StrictConvexOn ℝ≥0 univ f :=
  by
  refine ⟨convex_univ, fun x _ y _ hxy a b ha hb hab => ?_⟩
  exact
    (strictConvexOn_rpow hp₁').2 (by positivity : 0 ≤ x) (by positivity : 0 ≤ y) (by simp [hxy]) ha hb
      (by simp; norm_cast)
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
hp₀' : 0 < 1 / p
hp₁' : 1 < 1 / p
f : ℝ≥0 ≃o ℝ≥0 := orderIsoRpow (1 / p) hp₀'
⊢ StrictConvexOn ℝ≥0 univ ↑f
[PROOFSTEP]
refine ⟨convex_univ, fun x _ y _ hxy a b ha hb hab => ?_⟩
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
hp₀' : 0 < 1 / p
hp₁' : 1 < 1 / p
f : ℝ≥0 ≃o ℝ≥0 := orderIsoRpow (1 / p) hp₀'
x : ℝ≥0
x✝¹ : x ∈ univ
y : ℝ≥0
x✝ : y ∈ univ
hxy : x ≠ y
a b : ℝ≥0
ha : 0 < a
hb : 0 < b
hab : a + b = 1
⊢ ↑f (a • x + b • y) < a • ↑f x + b • ↑f y
[PROOFSTEP]
exact
  (strictConvexOn_rpow hp₁').2 (by positivity : 0 ≤ x) (by positivity : 0 ≤ y) (by simp [hxy]) ha hb
    (by simp; norm_cast)
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
hp₀' : 0 < 1 / p
hp₁' : 1 < 1 / p
f : ℝ≥0 ≃o ℝ≥0 := orderIsoRpow (1 / p) hp₀'
x : ℝ≥0
x✝¹ : x ∈ univ
y : ℝ≥0
x✝ : y ∈ univ
hxy : x ≠ y
a b : ℝ≥0
ha : 0 < a
hb : 0 < b
hab : a + b = 1
⊢ 0 ≤ x
[PROOFSTEP]
positivity
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
hp₀' : 0 < 1 / p
hp₁' : 1 < 1 / p
f : ℝ≥0 ≃o ℝ≥0 := orderIsoRpow (1 / p) hp₀'
x : ℝ≥0
x✝¹ : x ∈ univ
y : ℝ≥0
x✝ : y ∈ univ
hxy : x ≠ y
a b : ℝ≥0
ha : 0 < a
hb : 0 < b
hab : a + b = 1
⊢ 0 ≤ y
[PROOFSTEP]
positivity
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
hp₀' : 0 < 1 / p
hp₁' : 1 < 1 / p
f : ℝ≥0 ≃o ℝ≥0 := orderIsoRpow (1 / p) hp₀'
x : ℝ≥0
x✝¹ : x ∈ univ
y : ℝ≥0
x✝ : y ∈ univ
hxy : x ≠ y
a b : ℝ≥0
ha : 0 < a
hb : 0 < b
hab : a + b = 1
⊢ (fun a => ↑a) x ≠ (fun a => ↑a) y
[PROOFSTEP]
simp [hxy]
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
hp₀' : 0 < 1 / p
hp₁' : 1 < 1 / p
f : ℝ≥0 ≃o ℝ≥0 := orderIsoRpow (1 / p) hp₀'
x : ℝ≥0
x✝¹ : x ∈ univ
y : ℝ≥0
x✝ : y ∈ univ
hxy : x ≠ y
a b : ℝ≥0
ha : 0 < a
hb : 0 < b
hab : a + b = 1
⊢ ↑(↑(RingHom.id ℝ≥0) a) + ↑(↑(RingHom.id ℝ≥0) b) = 1
[PROOFSTEP]
simp
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
hp₀' : 0 < 1 / p
hp₁' : 1 < 1 / p
f : ℝ≥0 ≃o ℝ≥0 := orderIsoRpow (1 / p) hp₀'
x : ℝ≥0
x✝¹ : x ∈ univ
y : ℝ≥0
x✝ : y ∈ univ
hxy : x ≠ y
a b : ℝ≥0
ha : 0 < a
hb : 0 < b
hab : a + b = 1
⊢ ↑a + ↑b = 1
[PROOFSTEP]
norm_cast
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
hp₀' : 0 < 1 / p
hp₁' : 1 < 1 / p
f : ℝ≥0 ≃o ℝ≥0 := orderIsoRpow (1 / p) hp₀'
h₁ : StrictConvexOn ℝ≥0 univ ↑f
⊢ StrictConcaveOn ℝ≥0 univ fun x => x ^ p
[PROOFSTEP]
have h₂ : ∀ x, f.symm x = x ^ p := by simp [NNReal.orderIsoRpow_symm_eq]
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
hp₀' : 0 < 1 / p
hp₁' : 1 < 1 / p
f : ℝ≥0 ≃o ℝ≥0 := orderIsoRpow (1 / p) hp₀'
h₁ : StrictConvexOn ℝ≥0 univ ↑f
⊢ ∀ (x : ℝ≥0), ↑(OrderIso.symm f) x = x ^ p
[PROOFSTEP]
simp [NNReal.orderIsoRpow_symm_eq]
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
hp₀' : 0 < 1 / p
hp₁' : 1 < 1 / p
f : ℝ≥0 ≃o ℝ≥0 := orderIsoRpow (1 / p) hp₀'
h₁ : StrictConvexOn ℝ≥0 univ ↑f
h₂ : ∀ (x : ℝ≥0), ↑(OrderIso.symm f) x = x ^ p
⊢ StrictConcaveOn ℝ≥0 univ fun x => x ^ p
[PROOFSTEP]
refine ⟨convex_univ, fun x _ y _ hxy a b ha hb hab => ?_⟩
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
hp₀' : 0 < 1 / p
hp₁' : 1 < 1 / p
f : ℝ≥0 ≃o ℝ≥0 := orderIsoRpow (1 / p) hp₀'
h₁ : StrictConvexOn ℝ≥0 univ ↑f
h₂ : ∀ (x : ℝ≥0), ↑(OrderIso.symm f) x = x ^ p
x : ℝ≥0
x✝¹ : x ∈ univ
y : ℝ≥0
x✝ : y ∈ univ
hxy : x ≠ y
a b : ℝ≥0
ha : 0 < a
hb : 0 < b
hab : a + b = 1
⊢ a • (fun x => x ^ p) x + b • (fun x => x ^ p) y < (fun x => x ^ p) (a • x + b • y)
[PROOFSTEP]
simp only [← h₂]
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
hp₀' : 0 < 1 / p
hp₁' : 1 < 1 / p
f : ℝ≥0 ≃o ℝ≥0 := orderIsoRpow (1 / p) hp₀'
h₁ : StrictConvexOn ℝ≥0 univ ↑f
h₂ : ∀ (x : ℝ≥0), ↑(OrderIso.symm f) x = x ^ p
x : ℝ≥0
x✝¹ : x ∈ univ
y : ℝ≥0
x✝ : y ∈ univ
hxy : x ≠ y
a b : ℝ≥0
ha : 0 < a
hb : 0 < b
hab : a + b = 1
⊢ a • ↑(OrderIso.symm (orderIsoRpow (1 / p) hp₀')) x + b • ↑(OrderIso.symm (orderIsoRpow (1 / p) hp₀')) y <
    ↑(OrderIso.symm (orderIsoRpow (1 / p) hp₀')) (a • x + b • y)
[PROOFSTEP]
exact (f.strictConcaveOn_symm h₁).2 (Set.mem_univ x) (Set.mem_univ y) hxy ha hb hab
[GOAL]
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p
[PROOFSTEP]
by_cases hp : p = 0
[GOAL]
case pos
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p = 0
⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p
case neg p : ℝ hp₀ : 0 ≤ p hp₁ : p ≤ 1 hp : ¬p = 0 ⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p
[PROOFSTEP]
case pos => exact ⟨convex_univ, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩
[GOAL]
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p = 0
⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p
[PROOFSTEP]
case pos => exact ⟨convex_univ, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩
[GOAL]
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p = 0
⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p
[PROOFSTEP]
exact ⟨convex_univ, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩
[GOAL]
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p = 0
x✝⁷ : ℝ≥0
x✝⁶ : x✝⁷ ∈ univ
x✝⁵ : ℝ≥0
x✝⁴ : x✝⁵ ∈ univ
x✝³ x✝² : ℝ≥0
x✝¹ : 0 ≤ x✝³
x✝ : 0 ≤ x✝²
hab : x✝³ + x✝² = 1
⊢ x✝³ • (fun x => x ^ p) x✝⁷ + x✝² • (fun x => x ^ p) x✝⁵ ≤ (fun x => x ^ p) (x✝³ • x✝⁷ + x✝² • x✝⁵)
[PROOFSTEP]
simp [hp, hab]
[GOAL]
case neg
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : ¬p = 0
⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p
[PROOFSTEP]
case neg =>
  push_neg at hp
  by_cases hp' : p = 1
  case pos => exact ⟨convex_univ, by simp [hp']⟩
  case neg =>
    push_neg at hp'
    exact (strictConcaveOn_rpow (by positivity) (lt_of_le_of_ne hp₁ hp')).concaveOn
[GOAL]
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : ¬p = 0
⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p
[PROOFSTEP]
case neg =>
  push_neg at hp
  by_cases hp' : p = 1
  case pos => exact ⟨convex_univ, by simp [hp']⟩
  case neg =>
    push_neg at hp'
    exact (strictConcaveOn_rpow (by positivity) (lt_of_le_of_ne hp₁ hp')).concaveOn
[GOAL]
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : ¬p = 0
⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p
[PROOFSTEP]
push_neg at hp
[GOAL]
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p
[PROOFSTEP]
by_cases hp' : p = 1
[GOAL]
case pos
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : p = 1
⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p
case neg p : ℝ hp₀ : 0 ≤ p hp₁ : p ≤ 1 hp : p ≠ 0 hp' : ¬p = 1 ⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p
[PROOFSTEP]
case pos => exact ⟨convex_univ, by simp [hp']⟩
[GOAL]
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : p = 1
⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p
[PROOFSTEP]
case pos => exact ⟨convex_univ, by simp [hp']⟩
[GOAL]
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : p = 1
⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p
[PROOFSTEP]
exact ⟨convex_univ, by simp [hp']⟩
[GOAL]
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : p = 1
⊢ ∀ ⦃x : ℝ≥0⦄,
    x ∈ univ →
      ∀ ⦃y : ℝ≥0⦄,
        y ∈ univ →
          ∀ ⦃a b : ℝ≥0⦄,
            0 ≤ a →
              0 ≤ b → a + b = 1 → a • (fun x => x ^ p) x + b • (fun x => x ^ p) y ≤ (fun x => x ^ p) (a • x + b • y)
[PROOFSTEP]
simp [hp']
[GOAL]
case neg
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : ¬p = 1
⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p
[PROOFSTEP]
case neg =>
  push_neg at hp'
  exact (strictConcaveOn_rpow (by positivity) (lt_of_le_of_ne hp₁ hp')).concaveOn
[GOAL]
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : ¬p = 1
⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p
[PROOFSTEP]
case neg =>
  push_neg at hp'
  exact (strictConcaveOn_rpow (by positivity) (lt_of_le_of_ne hp₁ hp')).concaveOn
[GOAL]
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : ¬p = 1
⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p
[PROOFSTEP]
push_neg at hp'
[GOAL]
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : p ≠ 1
⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p
[PROOFSTEP]
exact (strictConcaveOn_rpow (by positivity) (lt_of_le_of_ne hp₁ hp')).concaveOn
[GOAL]
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : p ≠ 1
⊢ 0 < p
[PROOFSTEP]
positivity
[GOAL]
⊢ StrictConcaveOn ℝ≥0 univ ↑sqrt
[PROOFSTEP]
have : NNReal.sqrt = fun (x : ℝ≥0) ↦ x ^ (1 / (2 : ℝ)) := by ext x; exact_mod_cast NNReal.sqrt_eq_rpow x
[GOAL]
⊢ ↑sqrt = fun x => x ^ (1 / 2)
[PROOFSTEP]
ext x
[GOAL]
case h.a
x : ℝ≥0
⊢ ↑(↑sqrt x) = ↑(x ^ (1 / 2))
[PROOFSTEP]
exact_mod_cast NNReal.sqrt_eq_rpow x
[GOAL]
this : ↑sqrt = fun x => x ^ (1 / 2)
⊢ StrictConcaveOn ℝ≥0 univ ↑sqrt
[PROOFSTEP]
rw [this]
[GOAL]
this : ↑sqrt = fun x => x ^ (1 / 2)
⊢ StrictConcaveOn ℝ≥0 univ fun x => x ^ (1 / 2)
[PROOFSTEP]
exact strictConcaveOn_rpow (by positivity) (by linarith)
[GOAL]
this : ↑sqrt = fun x => x ^ (1 / 2)
⊢ 0 < 1 / 2
[PROOFSTEP]
positivity
[GOAL]
this : ↑sqrt = fun x => x ^ (1 / 2)
⊢ 1 / 2 < 1
[PROOFSTEP]
linarith
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
⊢ StrictConcaveOn ℝ (Ici 0) fun x => x ^ p
[PROOFSTEP]
refine ⟨convex_Ici _, fun x hx y hy hxy a b ha hb hab => ?_⟩
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
⊢ a • (fun x => x ^ p) x + b • (fun x => x ^ p) y < (fun x => x ^ p) (a • x + b • y)
[PROOFSTEP]
let x' : ℝ≥0 := ⟨x, hx⟩
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
x' : ℝ≥0 := { val := x, property := hx }
⊢ a • (fun x => x ^ p) x + b • (fun x => x ^ p) y < (fun x => x ^ p) (a • x + b • y)
[PROOFSTEP]
let y' : ℝ≥0 := ⟨y, hy⟩
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
x' : ℝ≥0 := { val := x, property := hx }
y' : ℝ≥0 := { val := y, property := hy }
⊢ a • (fun x => x ^ p) x + b • (fun x => x ^ p) y < (fun x => x ^ p) (a • x + b • y)
[PROOFSTEP]
let a' : ℝ≥0 := ⟨a, by positivity⟩
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
x' : ℝ≥0 := { val := x, property := hx }
y' : ℝ≥0 := { val := y, property := hy }
⊢ 0 ≤ a
[PROOFSTEP]
positivity
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
x' : ℝ≥0 := { val := x, property := hx }
y' : ℝ≥0 := { val := y, property := hy }
a' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }
⊢ a • (fun x => x ^ p) x + b • (fun x => x ^ p) y < (fun x => x ^ p) (a • x + b • y)
[PROOFSTEP]
let b' : ℝ≥0 := ⟨b, by positivity⟩
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
x' : ℝ≥0 := { val := x, property := hx }
y' : ℝ≥0 := { val := y, property := hy }
a' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }
⊢ 0 ≤ b
[PROOFSTEP]
positivity
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
x' : ℝ≥0 := { val := x, property := hx }
y' : ℝ≥0 := { val := y, property := hy }
a' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }
b' : ℝ≥0 := { val := b, property := (_ : 0 ≤ b) }
⊢ a • (fun x => x ^ p) x + b • (fun x => x ^ p) y < (fun x => x ^ p) (a • x + b • y)
[PROOFSTEP]
have hx' : (fun z => z ^ p) x = (fun z => z ^ p) x' := rfl
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
x' : ℝ≥0 := { val := x, property := hx }
y' : ℝ≥0 := { val := y, property := hy }
a' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }
b' : ℝ≥0 := { val := b, property := (_ : 0 ≤ b) }
hx' : (fun z => z ^ p) x = ↑((fun z => z ^ p) x')
⊢ a • (fun x => x ^ p) x + b • (fun x => x ^ p) y < (fun x => x ^ p) (a • x + b • y)
[PROOFSTEP]
have hy' : (fun z => z ^ p) y = (fun z => z ^ p) y' := rfl
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
x' : ℝ≥0 := { val := x, property := hx }
y' : ℝ≥0 := { val := y, property := hy }
a' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }
b' : ℝ≥0 := { val := b, property := (_ : 0 ≤ b) }
hx' : (fun z => z ^ p) x = ↑((fun z => z ^ p) x')
hy' : (fun z => z ^ p) y = ↑((fun z => z ^ p) y')
⊢ a • (fun x => x ^ p) x + b • (fun x => x ^ p) y < (fun x => x ^ p) (a • x + b • y)
[PROOFSTEP]
have hxy' : x' ≠ y' := Subtype.ne_of_val_ne hxy
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
x' : ℝ≥0 := { val := x, property := hx }
y' : ℝ≥0 := { val := y, property := hy }
a' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }
b' : ℝ≥0 := { val := b, property := (_ : 0 ≤ b) }
hx' : (fun z => z ^ p) x = ↑((fun z => z ^ p) x')
hy' : (fun z => z ^ p) y = ↑((fun z => z ^ p) y')
hxy' : x' ≠ y'
⊢ a • (fun x => x ^ p) x + b • (fun x => x ^ p) y < (fun x => x ^ p) (a • x + b • y)
[PROOFSTEP]
have hab' : a' + b' = 1 := by ext; simp [hab]
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
x' : ℝ≥0 := { val := x, property := hx }
y' : ℝ≥0 := { val := y, property := hy }
a' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }
b' : ℝ≥0 := { val := b, property := (_ : 0 ≤ b) }
hx' : (fun z => z ^ p) x = ↑((fun z => z ^ p) x')
hy' : (fun z => z ^ p) y = ↑((fun z => z ^ p) y')
hxy' : x' ≠ y'
⊢ a' + b' = 1
[PROOFSTEP]
ext
[GOAL]
case a
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
x' : ℝ≥0 := { val := x, property := hx }
y' : ℝ≥0 := { val := y, property := hy }
a' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }
b' : ℝ≥0 := { val := b, property := (_ : 0 ≤ b) }
hx' : (fun z => z ^ p) x = ↑((fun z => z ^ p) x')
hy' : (fun z => z ^ p) y = ↑((fun z => z ^ p) y')
hxy' : x' ≠ y'
⊢ ↑(a' + b') = ↑1
[PROOFSTEP]
simp [hab]
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
x' : ℝ≥0 := { val := x, property := hx }
y' : ℝ≥0 := { val := y, property := hy }
a' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }
b' : ℝ≥0 := { val := b, property := (_ : 0 ≤ b) }
hx' : (fun z => z ^ p) x = ↑((fun z => z ^ p) x')
hy' : (fun z => z ^ p) y = ↑((fun z => z ^ p) y')
hxy' : x' ≠ y'
hab' : a' + b' = 1
⊢ a • (fun x => x ^ p) x + b • (fun x => x ^ p) y < (fun x => x ^ p) (a • x + b • y)
[PROOFSTEP]
rw [hx', hy']
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
x' : ℝ≥0 := { val := x, property := hx }
y' : ℝ≥0 := { val := y, property := hy }
a' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }
b' : ℝ≥0 := { val := b, property := (_ : 0 ≤ b) }
hx' : (fun z => z ^ p) x = ↑((fun z => z ^ p) x')
hy' : (fun z => z ^ p) y = ↑((fun z => z ^ p) y')
hxy' : x' ≠ y'
hab' : a' + b' = 1
⊢ a • ↑((fun z => z ^ p) x') + b • ↑((fun z => z ^ p) y') < (fun x => x ^ p) (a • x + b • y)
[PROOFSTEP]
exact
  (NNReal.strictConcaveOn_rpow hp₀ hp₁).2 (Set.mem_univ x') (Set.mem_univ y') hxy' (by exact_mod_cast ha)
    (by exact_mod_cast hb) hab'
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
x' : ℝ≥0 := { val := x, property := hx }
y' : ℝ≥0 := { val := y, property := hy }
a' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }
b' : ℝ≥0 := { val := b, property := (_ : 0 ≤ b) }
hx' : (fun z => z ^ p) x = ↑((fun z => z ^ p) x')
hy' : (fun z => z ^ p) y = ↑((fun z => z ^ p) y')
hxy' : x' ≠ y'
hab' : a' + b' = 1
⊢ 0 < a'
[PROOFSTEP]
exact_mod_cast ha
[GOAL]
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
x' : ℝ≥0 := { val := x, property := hx }
y' : ℝ≥0 := { val := y, property := hy }
a' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }
b' : ℝ≥0 := { val := b, property := (_ : 0 ≤ b) }
hx' : (fun z => z ^ p) x = ↑((fun z => z ^ p) x')
hy' : (fun z => z ^ p) y = ↑((fun z => z ^ p) y')
hxy' : x' ≠ y'
hab' : a' + b' = 1
⊢ 0 < b'
[PROOFSTEP]
exact_mod_cast hb
[GOAL]
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p
[PROOFSTEP]
by_cases hp : p = 0
[GOAL]
case pos
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p = 0
⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p
case neg p : ℝ hp₀ : 0 ≤ p hp₁ : p ≤ 1 hp : ¬p = 0 ⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p
[PROOFSTEP]
case pos => exact ⟨convex_Ici 0, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩
[GOAL]
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p = 0
⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p
[PROOFSTEP]
case pos => exact ⟨convex_Ici 0, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩
[GOAL]
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p = 0
⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p
[PROOFSTEP]
exact ⟨convex_Ici 0, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩
[GOAL]
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p = 0
x✝⁷ : ℝ
x✝⁶ : x✝⁷ ∈ Ici 0
x✝⁵ : ℝ
x✝⁴ : x✝⁵ ∈ Ici 0
x✝³ x✝² : ℝ
x✝¹ : 0 ≤ x✝³
x✝ : 0 ≤ x✝²
hab : x✝³ + x✝² = 1
⊢ x✝³ • (fun x => x ^ p) x✝⁷ + x✝² • (fun x => x ^ p) x✝⁵ ≤ (fun x => x ^ p) (x✝³ • x✝⁷ + x✝² • x✝⁵)
[PROOFSTEP]
simp [hp, hab]
[GOAL]
case neg
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : ¬p = 0
⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p
[PROOFSTEP]
case neg =>
  push_neg at hp
  by_cases hp' : p = 1
  case pos => exact ⟨convex_Ici 0, by simp [hp']⟩
  case neg =>
    push_neg at hp'
    exact (strictConcaveOn_rpow (by positivity) (lt_of_le_of_ne hp₁ hp')).concaveOn
[GOAL]
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : ¬p = 0
⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p
[PROOFSTEP]
case neg =>
  push_neg at hp
  by_cases hp' : p = 1
  case pos => exact ⟨convex_Ici 0, by simp [hp']⟩
  case neg =>
    push_neg at hp'
    exact (strictConcaveOn_rpow (by positivity) (lt_of_le_of_ne hp₁ hp')).concaveOn
[GOAL]
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : ¬p = 0
⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p
[PROOFSTEP]
push_neg at hp
[GOAL]
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p
[PROOFSTEP]
by_cases hp' : p = 1
[GOAL]
case pos
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : p = 1
⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p
case neg p : ℝ hp₀ : 0 ≤ p hp₁ : p ≤ 1 hp : p ≠ 0 hp' : ¬p = 1 ⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p
[PROOFSTEP]
case pos => exact ⟨convex_Ici 0, by simp [hp']⟩
[GOAL]
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : p = 1
⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p
[PROOFSTEP]
case pos => exact ⟨convex_Ici 0, by simp [hp']⟩
[GOAL]
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : p = 1
⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p
[PROOFSTEP]
exact ⟨convex_Ici 0, by simp [hp']⟩
[GOAL]
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : p = 1
⊢ ∀ ⦃x : ℝ⦄,
    x ∈ Ici 0 →
      ∀ ⦃y : ℝ⦄,
        y ∈ Ici 0 →
          ∀ ⦃a b : ℝ⦄,
            0 ≤ a →
              0 ≤ b → a + b = 1 → a • (fun x => x ^ p) x + b • (fun x => x ^ p) y ≤ (fun x => x ^ p) (a • x + b • y)
[PROOFSTEP]
simp [hp']
[GOAL]
case neg
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : ¬p = 1
⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p
[PROOFSTEP]
case neg =>
  push_neg at hp'
  exact (strictConcaveOn_rpow (by positivity) (lt_of_le_of_ne hp₁ hp')).concaveOn
[GOAL]
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : ¬p = 1
⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p
[PROOFSTEP]
case neg =>
  push_neg at hp'
  exact (strictConcaveOn_rpow (by positivity) (lt_of_le_of_ne hp₁ hp')).concaveOn
[GOAL]
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : ¬p = 1
⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p
[PROOFSTEP]
push_neg at hp'
[GOAL]
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : p ≠ 1
⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p
[PROOFSTEP]
exact (strictConcaveOn_rpow (by positivity) (lt_of_le_of_ne hp₁ hp')).concaveOn
[GOAL]
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : p ≠ 1
⊢ 0 < p
[PROOFSTEP]
positivity
[GOAL]
⊢ StrictConcaveOn ℝ (Ici 0) sqrt
[PROOFSTEP]
have : Real.sqrt = fun (x : ℝ) ↦ x ^ (1 / (2 : ℝ)) := by ext x; exact Real.sqrt_eq_rpow x
[GOAL]
⊢ sqrt = fun x => x ^ (1 / 2)
[PROOFSTEP]
ext x
[GOAL]
case h
x : ℝ
⊢ sqrt x = x ^ (1 / 2)
[PROOFSTEP]
exact Real.sqrt_eq_rpow x
[GOAL]
this : sqrt = fun x => x ^ (1 / 2)
⊢ StrictConcaveOn ℝ (Ici 0) sqrt
[PROOFSTEP]
rw [this]
[GOAL]
this : sqrt = fun x => x ^ (1 / 2)
⊢ StrictConcaveOn ℝ (Ici 0) fun x => x ^ (1 / 2)
[PROOFSTEP]
exact strictConcaveOn_rpow (by positivity) (by linarith)
[GOAL]
this : sqrt = fun x => x ^ (1 / 2)
⊢ 0 < 1 / 2
[PROOFSTEP]
positivity
[GOAL]
this : sqrt = fun x => x ^ (1 / 2)
⊢ 1 / 2 < 1
[PROOFSTEP]
linarith


[GOAL]
X : Type ?u.7
inst✝² : TopologicalSpace X
s : Set X
inst✝¹ : T0Space ↑s
inst✝ : SecondCountableTopology ↑s
⊢ HasCountableSeparatingOn X IsOpen s
[PROOFSTEP]
suffices HasCountableSeparatingOn s IsOpen univ from .of_subtype fun _ ↦ isOpen_induced_iff.1
[GOAL]
X : Type ?u.7
inst✝² : TopologicalSpace X
s : Set X
inst✝¹ : T0Space ↑s
inst✝ : SecondCountableTopology ↑s
⊢ HasCountableSeparatingOn (↑s) IsOpen univ
[PROOFSTEP]
refine ⟨⟨countableBasis s, countable_countableBasis _, fun _ ↦ isOpen_of_mem_countableBasis, fun x _ y _ h ↦ ?_⟩⟩
[GOAL]
X : Type ?u.7
inst✝² : TopologicalSpace X
s : Set X
inst✝¹ : T0Space ↑s
inst✝ : SecondCountableTopology ↑s
x : ↑s
x✝¹ : x ∈ univ
y : ↑s
x✝ : y ∈ univ
h : ∀ (s_1 : Set ↑s), s_1 ∈ countableBasis ↑s → (x ∈ s_1 ↔ y ∈ s_1)
⊢ x = y
[PROOFSTEP]
exact ((isBasis_countableBasis _).inseparable_iff.2 h).eq


[GOAL]
m k : ℕ
⊢ shiftl m (k + 1) = m * 2 ^ (k + 1)
[PROOFSTEP]
show bit0 (shiftl m k) = m * (2 ^ k * 2)
[GOAL]
m k : ℕ
⊢ bit0 (shiftl m k) = m * (2 ^ k * 2)
[PROOFSTEP]
rw [bit0_val, shiftl_eq_mul_pow m k, mul_comm 2, mul_assoc]
[GOAL]
m : ℕ
⊢ shiftl' true m 0 + 1 = (m + 1) * 2 ^ 0
[PROOFSTEP]
simp [shiftl, shiftl', pow_zero, Nat.one_mul]
[GOAL]
m k : ℕ
⊢ shiftl' true m (k + 1) + 1 = (m + 1) * 2 ^ (k + 1)
[PROOFSTEP]
change bit1 (shiftl' true m k) + 1 = (m + 1) * (2 ^ k * 2)
[GOAL]
m k : ℕ
⊢ bit1 (shiftl' true m k) + 1 = (m + 1) * (2 ^ k * 2)
[PROOFSTEP]
rw [bit1_val]
[GOAL]
m k : ℕ
⊢ 2 * shiftl' true m k + 1 + 1 = (m + 1) * (2 ^ k * 2)
[PROOFSTEP]
change 2 * (shiftl' true m k + 1) = _
[GOAL]
m k : ℕ
⊢ 2 * (shiftl' true m k + 1) = (m + 1) * (2 ^ k * 2)
[PROOFSTEP]
rw [shiftl'_tt_eq_mul_pow m k, mul_left_comm, mul_comm 2]
[GOAL]
m k : ℕ
⊢ div2 (m / 2 ^ k) = m / 2 ^ (k + 1)
[PROOFSTEP]
rw [div2_val, Nat.div_div_eq_div_mul, Nat.pow_succ]
[GOAL]
b : Bool
m : ℕ
h : m ≠ 0
n : ℕ
⊢ shiftl' b m n ≠ 0
[PROOFSTEP]
induction n
[GOAL]
case zero
b : Bool
m : ℕ
h : m ≠ 0
⊢ shiftl' b m zero ≠ 0
[PROOFSTEP]
simp [bit_ne_zero, shiftl', *]
[GOAL]
case succ
b : Bool
m : ℕ
h : m ≠ 0
n✝ : ℕ
n_ih✝ : shiftl' b m n✝ ≠ 0
⊢ shiftl' b m (succ n✝) ≠ 0
[PROOFSTEP]
simp [bit_ne_zero, shiftl', *]
[GOAL]
⊢ size 0 = 0
[PROOFSTEP]
simp [size]
[GOAL]
b : Bool
n : ℕ
h : bit b n ≠ 0
⊢ size (bit b n) = succ (size n)
[PROOFSTEP]
rw [size]
[GOAL]
b : Bool
n : ℕ
h : bit b n ≠ 0
⊢ binaryRec 0 (fun x x => succ) (bit b n) = succ (binaryRec 0 (fun x x => succ) n)
[PROOFSTEP]
conv =>
  lhs
  rw [binaryRec]
  simp [h]
[GOAL]
b : Bool
n : ℕ
h : bit b n ≠ 0
| binaryRec 0 (fun x x => succ) (bit b n) = succ (binaryRec 0 (fun x x => succ) n)
[PROOFSTEP]
  lhs
  rw [binaryRec]
  simp [h]
[GOAL]
b : Bool
n : ℕ
h : bit b n ≠ 0
| binaryRec 0 (fun x x => succ) (bit b n) = succ (binaryRec 0 (fun x x => succ) n)
[PROOFSTEP]
  lhs
  rw [binaryRec]
  simp [h]
[GOAL]
b : Bool
n : ℕ
h : bit b n ≠ 0
| binaryRec 0 (fun x x => succ) (bit b n) = succ (binaryRec 0 (fun x x => succ) n)
[PROOFSTEP]
lhs
[GOAL]
b : Bool
n : ℕ
h : bit b n ≠ 0
| binaryRec 0 (fun x x => succ) (bit b n)
[PROOFSTEP]
rw [binaryRec]
[GOAL]
b : Bool
n : ℕ
h : bit b n ≠ 0
| if n0 : bit b n = 0 then Eq.mpr (_ : ℕ = ℕ) 0
  else
    let n' := div2 (bit b n);
    let_fun _x := (_ : bit (bodd (bit b n)) (div2 (bit b n)) = bit b n);
    Eq.mpr (_ : ℕ = ℕ) (succ (binaryRec 0 (fun x x => succ) n'))
[PROOFSTEP]
simp [h]
[GOAL]
b : Bool
n : ℕ
h : bit b n ≠ 0
⊢ succ (binaryRec 0 (fun x x => succ) (div2 (bit b n))) = succ (binaryRec 0 (fun x x => succ) n)
[PROOFSTEP]
rw [div2_bit]
[GOAL]
⊢ size (bit1 0) = 1
[PROOFSTEP]
rw [size_bit1, size_zero]
[GOAL]
b : Bool
m n : ℕ
h : shiftl' b m n ≠ 0
⊢ size (shiftl' b m n) = size m + n
[PROOFSTEP]
induction' n with n IH
[GOAL]
case zero
b : Bool
m n : ℕ
h✝ : shiftl' b m n ≠ 0
h : shiftl' b m zero ≠ 0
⊢ size (shiftl' b m zero) = size m + zero
[PROOFSTEP]
simp [shiftl'] at h ⊢
[GOAL]
case succ
b : Bool
m n✝ : ℕ
h✝ : shiftl' b m n✝ ≠ 0
n : ℕ
IH : shiftl' b m n ≠ 0 → size (shiftl' b m n) = size m + n
h : shiftl' b m (succ n) ≠ 0
⊢ size (shiftl' b m (succ n)) = size m + succ n
[PROOFSTEP]
simp [shiftl'] at h ⊢
[GOAL]
case succ
b : Bool
m n✝ : ℕ
h✝ : shiftl' b m n✝ ≠ 0
n : ℕ
IH : shiftl' b m n ≠ 0 → size (shiftl' b m n) = size m + n
h : ¬bit b (shiftl' b m n) = 0
⊢ size (bit b (shiftl' b m n)) = size m + succ n
[PROOFSTEP]
rw [size_bit h, Nat.add_succ]
[GOAL]
case succ
b : Bool
m n✝ : ℕ
h✝ : shiftl' b m n✝ ≠ 0
n : ℕ
IH : shiftl' b m n ≠ 0 → size (shiftl' b m n) = size m + n
h : ¬bit b (shiftl' b m n) = 0
⊢ succ (size (shiftl' b m n)) = succ (size m + n)
[PROOFSTEP]
by_cases s0 : shiftl' b m n = 0 <;> [skip; rw [IH s0]]
[GOAL]
case succ
b : Bool
m n✝ : ℕ
h✝ : shiftl' b m n✝ ≠ 0
n : ℕ
IH : shiftl' b m n ≠ 0 → size (shiftl' b m n) = size m + n
h : ¬bit b (shiftl' b m n) = 0
⊢ succ (size (shiftl' b m n)) = succ (size m + n)
[PROOFSTEP]
by_cases s0 : shiftl' b m n = 0
[GOAL]
case pos
b : Bool
m n✝ : ℕ
h✝ : shiftl' b m n✝ ≠ 0
n : ℕ
IH : shiftl' b m n ≠ 0 → size (shiftl' b m n) = size m + n
h : ¬bit b (shiftl' b m n) = 0
s0 : shiftl' b m n = 0
⊢ succ (size (shiftl' b m n)) = succ (size m + n)
[PROOFSTEP]
skip
[GOAL]
case neg
b : Bool
m n✝ : ℕ
h✝ : shiftl' b m n✝ ≠ 0
n : ℕ
IH : shiftl' b m n ≠ 0 → size (shiftl' b m n) = size m + n
h : ¬bit b (shiftl' b m n) = 0
s0 : ¬shiftl' b m n = 0
⊢ succ (size (shiftl' b m n)) = succ (size m + n)
[PROOFSTEP]
rw [IH s0]
[GOAL]
case pos
b : Bool
m n✝ : ℕ
h✝ : shiftl' b m n✝ ≠ 0
n : ℕ
IH : shiftl' b m n ≠ 0 → size (shiftl' b m n) = size m + n
h : ¬bit b (shiftl' b m n) = 0
s0 : shiftl' b m n = 0
⊢ succ (size (shiftl' b m n)) = succ (size m + n)
[PROOFSTEP]
rw [s0] at h ⊢
[GOAL]
case pos
b : Bool
m n✝ : ℕ
h✝ : shiftl' b m n✝ ≠ 0
n : ℕ
IH : shiftl' b m n ≠ 0 → size (shiftl' b m n) = size m + n
h : ¬bit b 0 = 0
s0 : shiftl' b m n = 0
⊢ succ (size 0) = succ (size m + n)
[PROOFSTEP]
cases b
[GOAL]
case pos.false
m n✝ n : ℕ
h✝ : shiftl' false m n✝ ≠ 0
IH : shiftl' false m n ≠ 0 → size (shiftl' false m n) = size m + n
h : ¬bit false 0 = 0
s0 : shiftl' false m n = 0
⊢ succ (size 0) = succ (size m + n)
[PROOFSTEP]
exact absurd rfl h
[GOAL]
case pos.true
m n✝ n : ℕ
h✝ : shiftl' true m n✝ ≠ 0
IH : shiftl' true m n ≠ 0 → size (shiftl' true m n) = size m + n
h : ¬bit true 0 = 0
s0 : shiftl' true m n = 0
⊢ succ (size 0) = succ (size m + n)
[PROOFSTEP]
have : shiftl' true m n + 1 = 1 := congr_arg (· + 1) s0
[GOAL]
case pos.true
m n✝ n : ℕ
h✝ : shiftl' true m n✝ ≠ 0
IH : shiftl' true m n ≠ 0 → size (shiftl' true m n) = size m + n
h : ¬bit true 0 = 0
s0 : shiftl' true m n = 0
this : shiftl' true m n + 1 = 1
⊢ succ (size 0) = succ (size m + n)
[PROOFSTEP]
rw [shiftl'_tt_eq_mul_pow] at this
[GOAL]
case pos.true
m n✝ n : ℕ
h✝ : shiftl' true m n✝ ≠ 0
IH : shiftl' true m n ≠ 0 → size (shiftl' true m n) = size m + n
h : ¬bit true 0 = 0
s0 : shiftl' true m n = 0
this : (m + 1) * 2 ^ n = 1
⊢ succ (size 0) = succ (size m + n)
[PROOFSTEP]
obtain rfl := succ.inj (eq_one_of_dvd_one ⟨_, this.symm⟩)
[GOAL]
case pos.true
n✝ n : ℕ
h✝ : ¬bit true 0 = 0
h : shiftl' true 0 n✝ ≠ 0
IH : shiftl' true 0 n ≠ 0 → size (shiftl' true 0 n) = size 0 + n
s0 : shiftl' true 0 n = 0
this : (0 + 1) * 2 ^ n = 1
⊢ succ (size 0) = succ (size 0 + n)
[PROOFSTEP]
simp only [zero_add, one_mul] at this
[GOAL]
case pos.true
n✝ n : ℕ
h✝ : ¬bit true 0 = 0
h : shiftl' true 0 n✝ ≠ 0
IH : shiftl' true 0 n ≠ 0 → size (shiftl' true 0 n) = size 0 + n
s0 : shiftl' true 0 n = 0
this : 2 ^ n = 1
⊢ succ (size 0) = succ (size 0 + n)
[PROOFSTEP]
obtain rfl : n = 0 :=
  Nat.eq_zero_of_le_zero (le_of_not_gt fun hn => ne_of_gt (pow_lt_pow_of_lt_right (by decide) hn) this)
[GOAL]
n✝ n : ℕ
h✝ : ¬bit true 0 = 0
h : shiftl' true 0 n✝ ≠ 0
IH : shiftl' true 0 n ≠ 0 → size (shiftl' true 0 n) = size 0 + n
s0 : shiftl' true 0 n = 0
this : 2 ^ n = 1
hn : n > 0
⊢ 1 < 2
[PROOFSTEP]
decide
[GOAL]
case pos.true
n : ℕ
h✝ : ¬bit true 0 = 0
h : shiftl' true 0 n ≠ 0
IH : shiftl' true 0 0 ≠ 0 → size (shiftl' true 0 0) = size 0 + 0
s0 : shiftl' true 0 0 = 0
this : 2 ^ 0 = 1
⊢ succ (size 0) = succ (size 0 + 0)
[PROOFSTEP]
rfl
[GOAL]
n : ℕ
⊢ n < 2 ^ size n
[PROOFSTEP]
rw [← one_shiftl]
[GOAL]
n : ℕ
⊢ n < shiftl 1 (size n)
[PROOFSTEP]
have : ∀ {n}, n = 0 → n < shiftl 1 (size n) := by simp
[GOAL]
n : ℕ
⊢ ∀ {n : ℕ}, n = 0 → n < shiftl 1 (size n)
[PROOFSTEP]
simp
[GOAL]
n : ℕ
this : ∀ {n : ℕ}, n = 0 → n < shiftl 1 (size n)
⊢ n < shiftl 1 (size n)
[PROOFSTEP]
apply binaryRec _ _ n
[GOAL]
n : ℕ
this : ∀ {n : ℕ}, n = 0 → n < shiftl 1 (size n)
⊢ 0 < shiftl 1 (size 0)
[PROOFSTEP]
apply this rfl
[GOAL]
n : ℕ
this : ∀ {n : ℕ}, n = 0 → n < shiftl 1 (size n)
⊢ ∀ (b : Bool) (n : ℕ), n < shiftl 1 (size n) → bit b n < shiftl 1 (size (bit b n))
[PROOFSTEP]
intro b n IH
[GOAL]
n✝ : ℕ
this : ∀ {n : ℕ}, n = 0 → n < shiftl 1 (size n)
b : Bool
n : ℕ
IH : n < shiftl 1 (size n)
⊢ bit b n < shiftl 1 (size (bit b n))
[PROOFSTEP]
by_cases h : bit b n = 0
[GOAL]
case pos
n✝ : ℕ
this : ∀ {n : ℕ}, n = 0 → n < shiftl 1 (size n)
b : Bool
n : ℕ
IH : n < shiftl 1 (size n)
h : bit b n = 0
⊢ bit b n < shiftl 1 (size (bit b n))
[PROOFSTEP]
apply this h
[GOAL]
case neg
n✝ : ℕ
this : ∀ {n : ℕ}, n = 0 → n < shiftl 1 (size n)
b : Bool
n : ℕ
IH : n < shiftl 1 (size n)
h : ¬bit b n = 0
⊢ bit b n < shiftl 1 (size (bit b n))
[PROOFSTEP]
rw [size_bit h, shiftl_succ]
[GOAL]
case neg
n✝ : ℕ
this : ∀ {n : ℕ}, n = 0 → n < shiftl 1 (size n)
b : Bool
n : ℕ
IH : n < shiftl 1 (size n)
h : ¬bit b n = 0
⊢ bit b n < bit0 (shiftl 1 (size n))
[PROOFSTEP]
exact bit_lt_bit0 _ IH
[GOAL]
m n : ℕ
h : size m ≤ n
⊢ 2 > 0
[PROOFSTEP]
decide
[GOAL]
m n : ℕ
⊢ m < 2 ^ n → size m ≤ n
[PROOFSTEP]
rw [← one_shiftl]
[GOAL]
m n : ℕ
⊢ m < shiftl 1 n → size m ≤ n
[PROOFSTEP]
revert n
[GOAL]
m : ℕ
⊢ ∀ {n : ℕ}, m < shiftl 1 n → size m ≤ n
[PROOFSTEP]
apply binaryRec _ _ m
[GOAL]
m : ℕ
⊢ ∀ {n : ℕ}, 0 < shiftl 1 n → size 0 ≤ n
[PROOFSTEP]
intro n
[GOAL]
m n : ℕ
⊢ 0 < shiftl 1 n → size 0 ≤ n
[PROOFSTEP]
simp
[GOAL]
m : ℕ
⊢ ∀ (b : Bool) (n : ℕ),
    (∀ {n_1 : ℕ}, n < shiftl 1 n_1 → size n ≤ n_1) → ∀ {n_1 : ℕ}, bit b n < shiftl 1 n_1 → size (bit b n) ≤ n_1
[PROOFSTEP]
intro b m IH n h
[GOAL]
m✝ : ℕ
b : Bool
m : ℕ
IH : ∀ {n : ℕ}, m < shiftl 1 n → size m ≤ n
n : ℕ
h : bit b m < shiftl 1 n
⊢ size (bit b m) ≤ n
[PROOFSTEP]
by_cases e : bit b m = 0
[GOAL]
case pos
m✝ : ℕ
b : Bool
m : ℕ
IH : ∀ {n : ℕ}, m < shiftl 1 n → size m ≤ n
n : ℕ
h : bit b m < shiftl 1 n
e : bit b m = 0
⊢ size (bit b m) ≤ n
[PROOFSTEP]
simp [e]
[GOAL]
case neg
m✝ : ℕ
b : Bool
m : ℕ
IH : ∀ {n : ℕ}, m < shiftl 1 n → size m ≤ n
n : ℕ
h : bit b m < shiftl 1 n
e : ¬bit b m = 0
⊢ size (bit b m) ≤ n
[PROOFSTEP]
rw [size_bit e]
[GOAL]
case neg
m✝ : ℕ
b : Bool
m : ℕ
IH : ∀ {n : ℕ}, m < shiftl 1 n → size m ≤ n
n : ℕ
h : bit b m < shiftl 1 n
e : ¬bit b m = 0
⊢ succ (size m) ≤ n
[PROOFSTEP]
cases' n with n
[GOAL]
case neg.zero
m✝ : ℕ
b : Bool
m : ℕ
IH : ∀ {n : ℕ}, m < shiftl 1 n → size m ≤ n
e : ¬bit b m = 0
h : bit b m < shiftl 1 zero
⊢ succ (size m) ≤ zero
[PROOFSTEP]
exact e.elim (Nat.eq_zero_of_le_zero (le_of_lt_succ h))
[GOAL]
case neg.succ
m✝ : ℕ
b : Bool
m : ℕ
IH : ∀ {n : ℕ}, m < shiftl 1 n → size m ≤ n
e : ¬bit b m = 0
n : ℕ
h : bit b m < shiftl 1 (succ n)
⊢ succ (size m) ≤ succ n
[PROOFSTEP]
apply succ_le_succ (IH _)
[GOAL]
m✝ : ℕ
b : Bool
m : ℕ
IH : ∀ {n : ℕ}, m < shiftl 1 n → size m ≤ n
e : ¬bit b m = 0
n : ℕ
h : bit b m < shiftl 1 (succ n)
⊢ m < shiftl 1 n
[PROOFSTEP]
apply lt_imp_lt_of_le_imp_le (fun h' => bit0_le_bit _ h') h
[GOAL]
m n : ℕ
⊢ m < size n ↔ 2 ^ m ≤ n
[PROOFSTEP]
rw [← not_lt, Decidable.iff_not_comm, not_lt, size_le]
[GOAL]
n : ℕ
⊢ 0 < size n ↔ 0 < n
[PROOFSTEP]
rw [lt_size]
[GOAL]
n : ℕ
⊢ 2 ^ 0 ≤ n ↔ 0 < n
[PROOFSTEP]
rfl
[GOAL]
n : ℕ
⊢ size n = 0 ↔ n = 0
[PROOFSTEP]
have := @size_pos n
[GOAL]
n : ℕ
this : 0 < size n ↔ 0 < n
⊢ size n = 0 ↔ n = 0
[PROOFSTEP]
simp [pos_iff_ne_zero] at this
[GOAL]
n : ℕ
this : ¬size n = 0 ↔ ¬n = 0
⊢ size n = 0 ↔ n = 0
[PROOFSTEP]
exact Decidable.not_iff_not.1 this
[GOAL]
n : ℕ
⊢ 1 < 2
[PROOFSTEP]
decide
[GOAL]
n : ℕ
⊢ List.length (bits n) = size n
[PROOFSTEP]
induction' n using Nat.binaryRec' with b n h ih
[GOAL]
case z
⊢ List.length (bits 0) = size 0
[PROOFSTEP]
simp
[GOAL]
case f
b : Bool
n : ℕ
h : n = 0 → b = true
ih : List.length (bits n) = size n
⊢ List.length (bits (bit b n)) = size (bit b n)
[PROOFSTEP]
rw [size_bit, bits_append_bit _ _ h]
[GOAL]
case f
b : Bool
n : ℕ
h : n = 0 → b = true
ih : List.length (bits n) = size n
⊢ List.length (b :: bits n) = succ (size n)
[PROOFSTEP]
simp [ih]
[GOAL]
case f
b : Bool
n : ℕ
h : n = 0 → b = true
ih : List.length (bits n) = size n
⊢ bit b n ≠ 0
[PROOFSTEP]
simpa [bit_eq_zero_iff]