awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Lean 4 proof step from Mathlib.RingTheory.Invariant.Basic (goal)
Goal:
B : Type u_2
inst : CommRing B
G : Type u_3
inst_1 : Group G
inst_2 : Finite G
inst_3 : MulSemiringAction G B
Q : Ideal B
inst_4 : Q.IsPrime
b₀ : B
hx :
  ∀ (g : G),
    g • Q = Q →
      Eq (α := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b₀) : B ⧸ Q)
        ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) b₀ : B ⧸ Q)
⊢ ∃ (a : B) (b : B),
    (∀ (g : G), g • a = a) ∧
      a ∉ Q ∧
        ∀ (g : G),
          Eq (α := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b) : B ⧸ Q)
            ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (if g • Q = Q then a * b₀ else 0) : B ⧸ Q)
have obtain : ∀ (a b : B) (ha1 : ∀ (g : G), g • a = a) (ha2 : a ∉ Q)
  (hb :
    ∀ (g : G),
      Eq (α := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b) : B ⧸ Q)
        ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (if g • Q = Q then a else 0) : B ⧸ Q)),
  ∃ (a : B) (b : B),
    (∀ (g : G), g • a = a) ∧
      a ∉ Q ∧
        ∀ (g : G),
          Eq (α := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b) : B ⧸ Q)
            ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (if g • Q = Q then a * b₀ else 0) : B ⧸ Q)
Tactic: obtain ⟨a, b, ha1, ha2, hb⟩ := fixed_of_fixed1_aux1 G Q
-- Lean 4 proof step from Mathlib.RingTheory.Invariant.Basic (goal)
Goal:
B : Type u_2
inst : CommRing B
G : Type u_3
inst_1 : Group G
inst_2 : Finite G
inst_3 : MulSemiringAction G B
Q : Ideal B
inst_4 : Q.IsPrime
b₀ : B
hx :
  ∀ (g : G),
    g • Q = Q →
      Eq (α := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b₀) : B ⧸ Q)
        ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) b₀ : B ⧸ Q)
a b : B
ha1 : ∀ (g : G), g • a = a
ha2 : a ∉ Q
hb :
  ∀ (g : G),
    Eq (α := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b) : B ⧸ Q)
      ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (if g • Q = Q then a else 0) : B ⧸ Q)
⊢ ∃ (a : B) (b : B),
    (∀ (g : G), g • a = a) ∧
      a ∉ Q ∧
        ∀ (g : G),
          Eq (α := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b) : B ⧸ Q)
            ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (if g • Q = Q then a * b₀ else 0) : B ⧸ Q)
have refine : ∀ (g : G),
  Eq (α := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • (b * b₀)) : B ⧸ Q)
    ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (if g • Q = Q then a * b₀ else 0) : B ⧸ Q)
Tactic: refine ⟨a, b * b₀, ha1, ha2, fun g ↦ ?_⟩
-- Lean 4 proof step from Mathlib.RingTheory.Invariant.Basic (goal)
Goal:
B : Type u_2
inst : CommRing B
G : Type u_3
inst_1 : Group G
inst_2 : Finite G
inst_3 : MulSemiringAction G B
Q : Ideal B
inst_4 : Q.IsPrime
b₀ : B
hx :
  ∀ (g : G),
    g • Q = Q →
      Eq (α := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b₀) : B ⧸ Q)
        ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) b₀ : B ⧸ Q)
a b : B
ha1 : ∀ (g : G), g • a = a
ha2 : a ∉ Q
hb :
  ∀ (g : G),
    Eq (α := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b) : B ⧸ Q)
      ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (if g • Q = Q then a else 0) : B ⧸ Q)
g : G
⊢ Eq (α := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • (b * b₀)) : B ⧸ Q)
    ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (if g • Q = Q then a * b₀ else 0) : B ⧸ Q)
have rw : HMul.hMul (α := B ⧸ Q) (β := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (if g • Q = Q then a else 0) : B ⧸ Q)
    ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b₀) : B ⧸ Q) =
  (algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (if g • Q = Q then a * b₀ else 0)
Tactic: rw [smul_mul', map_mul, hb]
-- Lean 4 proof step from Mathlib.RingTheory.Invariant.Basic (hypothesis)
Goal:
B : Type u_2
inst : CommRing B
G : Type u_3
inst_1 : Group G
inst_2 : Finite G
inst_3 : MulSemiringAction G B
Q : Ideal B
inst_4 : Q.IsPrime
b₀ : B
hx :
  ∀ (g : G),
    g • Q = Q →
      Eq (α := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b₀) : B ⧸ Q)
        ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) b₀ : B ⧸ Q)
a b : B
ha1 : ∀ (g : G), g • a = a
ha2 : a ∉ Q
hb :
  ∀ (g : G),
    Eq (α := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b) : B ⧸ Q)
      ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (if g • Q = Q then a else 0) : B ⧸ Q)
g : G
⊢ HMul.hMul (α := B ⧸ Q) (β := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (if g • Q = Q then a else 0) : B ⧸ Q)
      ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b₀) : B ⧸ Q) =
    (algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (if g • Q = Q then a * b₀ else 0)
have hb₁ : Eq (α := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b) : B ⧸ Q)
  ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (if g • Q = Q then a else 0) : B ⧸ Q)
Tactic: specialize hb g
Cleared hypotheses: hb
-- Lean 4 proof step from Mathlib.RingTheory.Invariant.Basic (goal)
Goal:
B : Type u_2
inst : CommRing B
G : Type u_3
inst_1 : Group G
inst_2 : Finite G
inst_3 : MulSemiringAction G B
Q : Ideal B
inst_4 : Q.IsPrime
b₀ : B
hx :
  ∀ (g : G),
    g • Q = Q →
      Eq (α := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b₀) : B ⧸ Q)
        ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) b₀ : B ⧸ Q)
a b : B
ha1 : ∀ (g : G), g • a = a
ha2 : a ∉ Q
g : G
hb :
  Eq (α := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b) : B ⧸ Q)
    ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (if g • Q = Q then a else 0) : B ⧸ Q)
⊢ HMul.hMul (α := B ⧸ Q) (β := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (if g • Q = Q then a else 0) : B ⧸ Q)
      ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b₀) : B ⧸ Q) =
    (algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (if g • Q = Q then a * b₀ else 0)
have pos : ∀ (hg : g • Q = Q),
  HMul.hMul (α := B ⧸ Q) (β := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) a : B ⧸ Q)
      ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b₀) : B ⧸ Q) =
    (algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (a * b₀)
Tactic: split_ifs with hg
-- Lean 4 proof step from Mathlib.RingTheory.Invariant.Basic (goal)
Goal:
B : Type u_2
inst : CommRing B
G : Type u_3
inst_1 : Group G
inst_2 : Finite G
inst_3 : MulSemiringAction G B
Q : Ideal B
inst_4 : Q.IsPrime
b₀ : B
hx :
  ∀ (g : G),
    g • Q = Q →
      Eq (α := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b₀) : B ⧸ Q)
        ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) b₀ : B ⧸ Q)
a b : B
ha1 : ∀ (g : G), g • a = a
ha2 : a ∉ Q
g : G
hb :
  Eq (α := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b) : B ⧸ Q)
    ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (if g • Q = Q then a else 0) : B ⧸ Q)
pos :
  ∀ (hg : g • Q = Q),
    HMul.hMul (α := B ⧸ Q) (β := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) a : B ⧸ Q)
        ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b₀) : B ⧸ Q) =
      (algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (a * b₀)
⊢ HMul.hMul (α := B ⧸ Q) (β := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (if g • Q = Q then a else 0) : B ⧸ Q)
      ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b₀) : B ⧸ Q) =
    (algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (if g • Q = Q then a * b₀ else 0)
have neg : ∀ (hg : ¬g • Q = Q),
  HMul.hMul (α := B ⧸ Q) (β := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) 0 : B ⧸ Q)
      ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b₀) : B ⧸ Q) =
    (algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) 0
Tactic: split_ifs with hg
-- Lean 4 proof step from Mathlib.RingTheory.Invariant.Basic (goal)
Goal:
B : Type u_2
inst : CommRing B
G : Type u_3
inst_1 : Group G
inst_2 : Finite G
inst_3 : MulSemiringAction G B
Q : Ideal B
inst_4 : Q.IsPrime
b₀ : B
hx :
  ∀ (g : G),
    g • Q = Q →
      Eq (α := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b₀) : B ⧸ Q)
        ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) b₀ : B ⧸ Q)
a b : B
ha1 : ∀ (g : G), g • a = a
ha2 : a ∉ Q
g : G
hb :
  Eq (α := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b) : B ⧸ Q)
    ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (if g • Q = Q then a else 0) : B ⧸ Q)
hg : g • Q = Q
⊢ HMul.hMul (α := B ⧸ Q) (β := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) a : B ⧸ Q)
      ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b₀) : B ⧸ Q) =
    (algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (a * b₀)
have pos : HMul.hMul (α := B ⧸ Q) (β := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) a : B ⧸ Q)
    ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b₀) : B ⧸ Q) =
  HMul.hMul (α := B ⧸ Q) (β := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) a : B ⧸ Q)
    ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) b₀ : B ⧸ Q)
Tactic: rw [map_mul, hx g hg]
-- Lean 4 proof step from Mathlib.RingTheory.Invariant.Basic (goal)
Goal:
B : Type u_2
inst : CommRing B
G : Type u_3
inst_1 : Group G
inst_2 : Finite G
inst_3 : MulSemiringAction G B
Q : Ideal B
inst_4 : Q.IsPrime
b₀ : B
hx :
  ∀ (g : G),
    g • Q = Q →
      Eq (α := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b₀) : B ⧸ Q)
        ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) b₀ : B ⧸ Q)
a b : B
ha1 : ∀ (g : G), g • a = a
ha2 : a ∉ Q
g : G
hb :
  Eq (α := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b) : B ⧸ Q)
    ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (if g • Q = Q then a else 0) : B ⧸ Q)
hg : g • Q = Q
pos :
  HMul.hMul (α := B ⧸ Q) (β := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) a : B ⧸ Q)
      ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b₀) : B ⧸ Q) =
    HMul.hMul (α := B ⧸ Q) (β := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) a : B ⧸ Q)
      ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) b₀ : B ⧸ Q)
⊢ HMul.hMul (α := B ⧸ Q) (β := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) a : B ⧸ Q)
      ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b₀) : B ⧸ Q) =
    (algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (a * b₀)
have pos₁ : HMul.hMul (α := B ⧸ Q) (β := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) a : B ⧸ Q)
    ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) b₀ : B ⧸ Q) =
  HMul.hMul (α := B ⧸ Q) (β := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) a : B ⧸ Q)
    ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) b₀ : B ⧸ Q)
Tactic: rw [map_mul, hx g hg]
-- Lean 4 proof step from Mathlib.RingTheory.Invariant.Basic (goal)
Goal:
B : Type u_2
inst : CommRing B
G : Type u_3
inst_1 : Group G
inst_2 : Finite G
inst_3 : MulSemiringAction G B
Q : Ideal B
inst_4 : Q.IsPrime
b₀ : B
hx :
  ∀ (g : G),
    g • Q = Q →
      Eq (α := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b₀) : B ⧸ Q)
        ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) b₀ : B ⧸ Q)
a b : B
ha1 : ∀ (g : G), g • a = a
ha2 : a ∉ Q
g : G
hb :
  Eq (α := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b) : B ⧸ Q)
    ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (if g • Q = Q then a else 0) : B ⧸ Q)
hg : ¬g • Q = Q
⊢ HMul.hMul (α := B ⧸ Q) (β := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) 0 : B ⧸ Q)
      ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b₀) : B ⧸ Q) =
    (algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) 0
have neg : HMul.hMul (α := B ⧸ Q) (β := B ⧸ Q) (0 : B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b₀) : B ⧸ Q) = 0
Tactic: rw [map_zero, zero_mul]
-- Lean 4 proof step from Mathlib.RingTheory.Invariant.Basic (goal)
Goal:
B : Type u_2
inst : CommRing B
G : Type u_3
inst_1 : Group G
inst_2 : Finite G
inst_3 : MulSemiringAction G B
Q : Ideal B
inst_4 : Q.IsPrime
b₀ : B
hx :
  ∀ (g : G),
    g • Q = Q →
      Eq (α := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b₀) : B ⧸ Q)
        ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) b₀ : B ⧸ Q)
a b : B
ha1 : ∀ (g : G), g • a = a
ha2 : a ∉ Q
g : G
hb :
  Eq (α := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b) : B ⧸ Q)
    ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (if g • Q = Q then a else 0) : B ⧸ Q)
hg : ¬g • Q = Q
neg : HMul.hMul (α := B ⧸ Q) (β := B ⧸ Q) (0 : B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b₀) : B ⧸ Q) = 0
⊢ HMul.hMul (α := B ⧸ Q) (β := B ⧸ Q) ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) 0 : B ⧸ Q)
      ((algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) (g • b₀) : B ⧸ Q) =
    (algebraMap B (B ⧸ Q) : (a : B) → B ⧸ Q) 0
have neg₁ : Eq.{u_2 + 1} (α := B ⧸ Q) 0 0
Tactic: rw [map_zero, zero_mul]
-- Lean 4 proof step from Mathlib.RingTheory.Invariant.Basic (goal)
Goal:
A : Type u_1
B : Type u_2
inst : CommRing A
inst_1 : CommRing B
inst_2 : Algebra A B
inst_3 : NoZeroDivisors B
b : B
i j : ℕ
p : A[X]
h :
  map (algebraMap A B) p =
    HSub.hSub (α := B[X]) (β := B[X]) X ((C : (a : B) → B[X]) b : B[X]) ^ i * HPow.hPow (α := B[X]) X j
f : B ≃ₐ[A] B
hi : i ≠ 0
⊢ (f : (a : B) → B) b = b
have pos : ∀ (ha : b = 0), (f : (a : B) → B) b = b
Tactic: by_cases ha : b = 0
-- Lean 4 proof step from Mathlib.RingTheory.Invariant.Basic (goal)
Goal:
A : Type u_1
B : Type u_2
inst : CommRing A
inst_1 : CommRing B
inst_2 : Algebra A B
inst_3 : NoZeroDivisors B
b : B
i j : ℕ
p : A[X]
h :
  map (algebraMap A B) p =
    HSub.hSub (α := B[X]) (β := B[X]) X ((C : (a : B) → B[X]) b : B[X]) ^ i * HPow.hPow (α := B[X]) X j
f : B ≃ₐ[A] B
hi : i ≠ 0
pos : ∀ (ha : b = 0), (f : (a : B) → B) b = b
⊢ (f : (a : B) → B) b = b
have neg : ∀ (ha : ¬b = 0), (f : (a : B) → B) b = b
Tactic: by_cases ha : b = 0
-- Lean 4 proof step from Mathlib.RingTheory.Invariant.Basic (goal)
Goal:
A : Type u_1
B : Type u_2
inst : CommRing A
inst_1 : CommRing B
inst_2 : Algebra A B
inst_3 : NoZeroDivisors B
b : B
i j : ℕ
p : A[X]
h :
  map (algebraMap A B) p =
    HSub.hSub (α := B[X]) (β := B[X]) X ((C : (a : B) → B[X]) b : B[X]) ^ i * HPow.hPow (α := B[X]) X j
f : B ≃ₐ[A] B
hi : i ≠ 0
ha : b = 0
⊢ (f : (a : B) → B) b = b
have pos : Eq (α := B) ((f : (a : B) → B) 0 : B) (0 : B)
Tactic: rw [ha, map_zero]
-- Lean 4 proof step from Mathlib.RingTheory.Invariant.Basic (goal)
Goal:
A : Type u_1
B : Type u_2
inst : CommRing A
inst_1 : CommRing B
inst_2 : Algebra A B
inst_3 : NoZeroDivisors B
b : B
i j : ℕ
p : A[X]
h :
  map (algebraMap A B) p =
    HSub.hSub (α := B[X]) (β := B[X]) X ((C : (a : B) → B[X]) b : B[X]) ^ i * HPow.hPow (α := B[X]) X j
f : B ≃ₐ[A] B
hi : i ≠ 0
ha : b = 0
pos : Eq (α := B) ((f : (a : B) → B) 0 : B) (0 : B)
⊢ (f : (a : B) → B) b = b
have pos₁ : Eq.{u_2 + 1} (α := B) 0 0
Tactic: rw [ha, map_zero]
-- Lean 4 proof step from Mathlib.RingTheory.Invariant.Basic (hypothesis)
Goal:
A : Type u_1
B : Type u_2
inst : CommRing A
inst_1 : CommRing B
inst_2 : Algebra A B
inst_3 : NoZeroDivisors B
b : B
i j : ℕ
p : A[X]
h :
  map (algebraMap A B) p =
    HSub.hSub (α := B[X]) (β := B[X]) X ((C : (a : B) → B[X]) b : B[X]) ^ i * HPow.hPow (α := B[X]) X j
f : B ≃ₐ[A] B
hi : i ≠ 0
ha : ¬b = 0
⊢ (f : (a : B) → B) b = b
have hf : eval b ((mapAlgHom (↑f : B →ₐ[A] B) : (a : B[X]) → B[X]) (map (algebraMap A B) p)) =
  eval b
    ((mapAlgHom (↑f : B →ₐ[A] B) : (a : B[X]) → B[X])
      (HSub.hSub (α := B[X]) (β := B[X]) X ((C : (a : B) → B[X]) b : B[X]) ^ i * HPow.hPow (α := B[X]) X j))
Tactic: have hf := congrArg (eval b) (congrArg (Polynomial.mapAlgHom f.toAlgHom) h)
-- Lean 4 proof step from Mathlib.RingTheory.Invariant.Basic (hypothesis)
Goal:
A : Type u_1
B : Type u_2
inst : CommRing A
inst_1 : CommRing B
inst_2 : Algebra A B
inst_3 : NoZeroDivisors B
b : B
i j : ℕ
p : A[X]
h :
  map (algebraMap A B) p =
    HSub.hSub (α := B[X]) (β := B[X]) X ((C : (a : B) → B[X]) b : B[X]) ^ i * HPow.hPow (α := B[X]) X j
f : B ≃ₐ[A] B
hi : i ≠ 0
ha : ¬b = 0
hf :
  eval b ((mapAlgHom (↑f : B →ₐ[A] B) : (a : B[X]) → B[X]) (map (algebraMap A B) p)) =
    eval b
      ((mapAlgHom (↑f : B →ₐ[A] B) : (a : B[X]) → B[X])
        (HSub.hSub (α := B[X]) (β := B[X]) X ((C : (a : B) → B[X]) b : B[X]) ^ i * HPow.hPow (α := B[X]) X j))
⊢ (f : (a : B) → B) b = b
have hf₁ : eval b (HSub.hSub (α := B[X]) (β := B[X]) X ((C : (a : B) → B[X]) b : B[X]) ^ i * HPow.hPow (α := B[X]) X j) =
  eval b
    (map (↑(↑f : B →ₐ[A] B) : B →+* B)
      (HSub.hSub (α := B[X]) (β := B[X]) X ((C : (a : B) → B[X]) b : B[X]) ^ i * HPow.hPow (α := B[X]) X j))
Tactic: rw [coe_mapAlgHom, map_map, f.toAlgHom.comp_algebraMap, h] at hf
Cleared hypotheses: hf
-- Lean 4 proof step from Mathlib.RingTheory.Invariant.Basic (hypothesis)
Goal:
A : Type u_1
B : Type u_2
inst : CommRing A
inst_1 : CommRing B
inst_2 : Algebra A B
inst_3 : NoZeroDivisors B
b : B
i j : ℕ
p : A[X]
h :
  map (algebraMap A B) p =
    HSub.hSub (α := B[X]) (β := B[X]) X ((C : (a : B) → B[X]) b : B[X]) ^ i * HPow.hPow (α := B[X]) X j
f : B ≃ₐ[A] B
hi : i ≠ 0
ha : ¬b = 0
hf :
  eval b (HSub.hSub (α := B[X]) (β := B[X]) X ((C : (a : B) → B[X]) b : B[X]) ^ i * HPow.hPow (α := B[X]) X j) =
    eval b
      (map (↑(↑f : B →ₐ[A] B) : B →+* B)
        (HSub.hSub (α := B[X]) (β := B[X]) X ((C : (a : B) → B[X]) b : B[X]) ^ i * HPow.hPow (α := B[X]) X j))
⊢ (f : (a : B) → B) b = b
have hf₁ : b = ((↑(↑f : B →ₐ[A] B) : B →+* B) : (a : B) → B) b
Tactic: simp_rw [Polynomial.map_mul, Polynomial.map_pow, Polynomial.map_sub, map_X, map_C,
    eval_mul, eval_pow, eval_sub, eval_X, eval_C, sub_self, zero_pow hi, zero_mul,
    zero_eq_mul, or_iff_left (pow_ne_zero j ha), pow_eq_zero_iff hi, sub_eq_zero] at hf
Cleared hypotheses: hf
-- Lean 4 proof step from Mathlib.RingTheory.Invariant.Basic (goal)
Goal:
A : Type u_1
B : Type u_2
inst : CommRing A
inst_1 : CommRing B
inst_2 : Algebra A B
G : Type u_3
inst_3 : Group G
inst_4 : Finite G
inst_5 : MulSemiringAction G B
inst_6 : SMulCommClass G A B
P : Ideal A
Q : Ideal B
inst_7 : Q.IsPrime
inst_8 : Q.LiesOver P
K : Type u_4
L : Type u_5
inst_9 : Field K
inst_10 : Field L
inst_11 : Algebra.{u_1, u_4} (A ⧸ P) K
inst_12 : Algebra.{u_2, u_5} (B ⧸ Q) L
inst_13 : Algebra.{u_1, u_5} (A ⧸ P) L
inst_14 : IsScalarTower.{u_1, u_2, u_5} (A ⧸ P) (B ⧸ Q) L
inst_15 : Algebra K L
inst_16 : IsScalarTower.{u_1, u_4, u_5} (A ⧸ P) K L
inst_17 : Algebra.IsInvariant A B G
inst_18 : Module.IsTorsionFree.{u_2, u_5} (B ⧸ Q) L
f : Gal(L/K)
b : B ⧸ Q
hx :
  ∀ (g : ↥(MulAction.stabilizer G Q)),
    ((((Ideal.Quotient.stabilizerHom Q P G :
                  MonoidHom.{u_3, u_2} (↥(MulAction.stabilizer G Q))
                    (AlgEquiv.{u_1, u_2, u_2} (A ⧸ P) (B ⧸ Q) (B ⧸ Q))) :
                (a : ↥(MulAction.stabilizer G Q)) → (B ⧸ Q) ≃ₐ[A ⧸ P] B ⧸ Q)
              g :
            AlgEquiv.{u_1, u_2, u_2} (A ⧸ P) (B ⧸ Q) (B ⧸ Q)) :
          (a : B ⧸ Q) → B ⧸ Q)
        b =
      b
⊢ Eq (α := L) ((f : (a : L) → L) ((algebraMap (B ⧸ Q) L : (a : B ⧸ Q) → L) b : L) : L)
    ((algebraMap (B ⧸ Q) L : (a : B ⧸ Q) → L) b : L)
have intro : ∀ (val : Fintype G),
  Eq (α := L) ((f : (a : L) → L) ((algebraMap (B ⧸ Q) L : (a : B ⧸ Q) → L) b : L) : L)
    ((algebraMap (B ⧸ Q) L : (a : B ⧸ Q) → L) b : L)
Tactic: cases nonempty_fintype G
-- Lean 4 proof step from Mathlib.RingTheory.Invariant.Basic (goal)
Goal:
A : Type u_1
B : Type u_2
inst : CommRing A
inst_1 : CommRing B
inst_2 : Algebra A B
G : Type u_3
inst_3 : Group G
inst_4 : Finite G
inst_5 : MulSemiringAction G B
inst_6 : SMulCommClass G A B
P : Ideal A
Q : Ideal B
inst_7 : Q.IsPrime
inst_8 : Q.LiesOver P
K : Type u_4
L : Type u_5
inst_9 : Field K
inst_10 : Field L
inst_11 : Algebra.{u_1, u_4} (A ⧸ P) K
inst_12 : Algebra.{u_2, u_5} (B ⧸ Q) L
inst_13 : Algebra.{u_1, u_5} (A ⧸ P) L
inst_14 : IsScalarTower.{u_1, u_2, u_5} (A ⧸ P) (B ⧸ Q) L
inst_15 : Algebra K L
inst_16 : IsScalarTower.{u_1, u_4, u_5} (A ⧸ P) K L
inst_17 : Algebra.IsInvariant A B G
inst_18 : Module.IsTorsionFree.{u_2, u_5} (B ⧸ Q) L
f : Gal(L/K)
b : B ⧸ Q
hx :
  ∀ (g : ↥(MulAction.stabilizer G Q)),
    ((((Ideal.Quotient.stabilizerHom Q P G :
                  MonoidHom.{u_3, u_2} (↥(MulAction.stabilizer G Q))
                    (AlgEquiv.{u_1, u_2, u_2} (A ⧸ P) (B ⧸ Q) (B ⧸ Q))) :
                (a : ↥(MulAction.stabilizer G Q)) → (B ⧸ Q) ≃ₐ[A ⧸ P] B ⧸ Q)
              g :
            AlgEquiv.{u_1, u_2, u_2} (A ⧸ P) (B ⧸ Q) (B ⧸ Q)) :
          (a : B ⧸ Q) → B ⧸ Q)
        b =
      b
val : Fintype G
⊢ Eq (α := L) ((f : (a : L) → L) ((algebraMap (B ⧸ Q) L : (a : B ⧸ Q) → L) b : L) : L)
    ((algebraMap (B ⧸ Q) L : (a : B ⧸ Q) → L) b : L)
have intro : ∀ (b₀ : B)
  (hx :
    ∀ (g : ↥(MulAction.stabilizer G Q)),
      Eq (α := B ⧸ Q)
        (((((Ideal.Quotient.stabilizerHom Q P G :
                      MonoidHom.{u_3, u_2} (↥(MulAction.stabilizer G Q))
                        (AlgEquiv.{u_1, u_2, u_2} (A ⧸ P) (B ⧸ Q) (B ⧸ Q))) :
                    (a : ↥(MulAction.stabilizer G Q)) → (B ⧸ Q) ≃ₐ[A ⧸ P] B ⧸ Q)
                  g :
                AlgEquiv.{u_1, u_2, u_2} (A ⧸ P) (B ⧸ Q) (B ⧸ Q)) :
              (a : B ⧸ Q) → B ⧸ Q)
            ((Ideal.Quotient.mk Q : (a : B) → B ⧸ Q) b₀) :
          B ⧸ Q)
        ((Ideal.Quotient.mk Q : (a : B) → B ⧸ Q) b₀ : B ⧸ Q)),
  Eq (α := L)
    ((f : (a : L) → L)
        ((algebraMap (B ⧸ Q) L : (a : B ⧸ Q) → L) ((Ideal.Quotient.mk Q : (a : B) → B ⧸ Q) b₀ : B ⧸ Q) : L) :
      L)
    ((algebraMap (B ⧸ Q) L : (a : B ⧸ Q) → L) ((Ideal.Quotient.mk Q : (a : B) → B ⧸ Q) b₀ : B ⧸ Q) : L)
Tactic: obtain ⟨b₀, rfl⟩ := Ideal.Quotient.mk_surjective b
Cleared hypotheses: b, hx
-- Lean 4 proof step from Mathlib.RingTheory.Invariant.Basic (goal)
Goal:
A : Type u_1
B : Type u_2
inst : CommRing A
inst_1 : CommRing B
inst_2 : Algebra A B
G : Type u_3
inst_3 : Group G
inst_4 : Finite G
inst_5 : MulSemiringAction G B
inst_6 : SMulCommClass G A B
P : Ideal A
Q : Ideal B
inst_7 : Q.IsPrime
inst_8 : Q.LiesOver P
K : Type u_4
L : Type u_5
inst_9 : Field K
inst_10 : Field L
inst_11 : Algebra.{u_1, u_4} (A ⧸ P) K
inst_12 : Algebra.{u_2, u_5} (B ⧸ Q) L
inst_13 : Algebra.{u_1, u_5} (A ⧸ P) L
inst_14 : IsScalarTower.{u_1, u_2, u_5} (A ⧸ P) (B ⧸ Q) L
inst_15 : Algebra K L
inst_16 : IsScalarTower.{u_1, u_4, u_5} (A ⧸ P) K L
inst_17 : Algebra.IsInvariant A B G
inst_18 : Module.IsTorsionFree.{u_2, u_5} (B ⧸ Q) L
f : Gal(L/K)
val : Fintype G
b₀ : B
hx :
  ∀ (g : ↥(MulAction.stabilizer G Q)),
    Eq (α := B ⧸ Q)
      (((((Ideal.Quotient.stabilizerHom Q P G :
                    MonoidHom.{u_3, u_2} (↥(MulAction.stabilizer G Q))
                      (AlgEquiv.{u_1, u_2, u_2} (A ⧸ P) (B ⧸ Q) (B ⧸ Q))) :
                  (a : ↥(MulAction.stabilizer G Q)) → (B ⧸ Q) ≃ₐ[A ⧸ P] B ⧸ Q)
                g :
              AlgEquiv.{u_1, u_2, u_2} (A ⧸ P) (B ⧸ Q) (B ⧸ Q)) :
            (a : B ⧸ Q) → B ⧸ Q)
          ((Ideal.Quotient.mk Q : (a : B) → B ⧸ Q) b₀) :
        B ⧸ Q)
      ((Ideal.Quotient.mk Q : (a : B) → B ⧸ Q) b₀ : B ⧸ Q)
⊢ Eq (α := L)
    ((f : (a : L) → L)
        ((algebraMap (B ⧸ Q) L : (a : B ⧸ Q) → L) ((Ideal.Quotient.mk Q : (a : B) → B ⧸ Q) b₀ : B ⧸ Q) : L) :
      L)
    ((algebraMap (B ⧸ Q) L : (a : B ⧸ Q) → L) ((Ideal.Quotient.mk Q : (a : B) → B ⧸ Q) b₀ : B ⧸ Q) : L)
have intro : Eq (α := L)
  ((f : (a : L) → L)
      ((algebraMap (B ⧸ Q) L : (a : B ⧸ Q) → L) (((algebraMap B (B ⧸ Q) : B →+* B ⧸ Q) : (a : B) → B ⧸ Q) b₀ : B ⧸ Q) :
        L) :
    L)
  ((algebraMap (B ⧸ Q) L : (a : B ⧸ Q) → L) (((algebraMap B (B ⧸ Q) : B →+* B ⧸ Q) : (a : B) → B ⧸ Q) b₀ : B ⧸ Q) : L)
Tactic: rw [← Ideal.Quotient.algebraMap_eq]