Theorem: Algebraic.cardinal_mk_lift_le_mul
File: Mathlib/Algebra/AlgebraicCard.lean

tactic: rw [← mk_uLift, ← mk_uLift]
state_before: R : Type u
A : Type v
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : IsDomain A
inst✝¹ : Algebra R A
inst✝ : NoZeroSMulDivisors R A
⊢ lift (#{ x // IsAlgebraic R x }) ≤ lift (#R[X]) * ℵ₀

tactic: choose g hg₁ hg₂ using fun x : { x : A | IsAlgebraic R x } => x.coe_prop
state_before: R : Type u
A : Type v
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : IsDomain A
inst✝¹ : Algebra R A
inst✝ : NoZeroSMulDivisors R A
⊢ (#ULift { x // IsAlgebraic R x }) ≤ (#ULift R[X]) * ℵ₀

tactic: refine' lift_mk_le_lift_mk_mul_of_lift_mk_preimage_le g fun f => _
state_before: R : Type u
A : Type v
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : IsDomain A
inst✝¹ : Algebra R A
inst✝ : NoZeroSMulDivisors R A
g : ↑{x | IsAlgebraic R x} → R[X]
hg₁ : ∀ (x : ↑{x | IsAlgebraic R x}), g x ≠ 0
hg₂ : ∀ (x : ↑{x | IsAlgebraic R x}), ↑(aeval ↑x) (g x) = 0
⊢ (#ULift { x // IsAlgebraic R x }) ≤ (#ULift R[X]) * ℵ₀

tactic: rw [lift_le_aleph0, le_aleph0_iff_set_countable]
state_before: R : Type u
A : Type v
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : IsDomain A
inst✝¹ : Algebra R A
inst✝ : NoZeroSMulDivisors R A
g : ↑{x | IsAlgebraic R x} → R[X]
hg₁ : ∀ (x : ↑{x | IsAlgebraic R x}), g x ≠ 0
hg₂ : ∀ (x : ↑{x | IsAlgebraic R x}), ↑(aeval ↑x) (g x) = 0
f : R[X]
⊢ lift (#↑(g ⁻¹' {f})) ≤ ℵ₀

tactic: suffices : MapsTo (↑) (g ⁻¹' {f}) (f.rootSet A)
state_before: R : Type u
A : Type v
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : IsDomain A
inst✝¹ : Algebra R A
inst✝ : NoZeroSMulDivisors R A
g : ↑{x | IsAlgebraic R x} → R[X]
hg₁ : ∀ (x : ↑{x | IsAlgebraic R x}), g x ≠ 0
hg₂ : ∀ (x : ↑{x | IsAlgebraic R x}), ↑(aeval ↑x) (g x) = 0
f : R[X]
⊢ Set.Countable (g ⁻¹' {f})

tactic: exact this.countable_of_injOn (Subtype.coe_injective.injOn _) (f.rootSet_finite A).countable
state_before: R : Type u
A : Type v
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : IsDomain A
inst✝¹ : Algebra R A
inst✝ : NoZeroSMulDivisors R A
g : ↑{x | IsAlgebraic R x} → R[X]
hg₁ : ∀ (x : ↑{x | IsAlgebraic R x}), g x ≠ 0
hg₂ : ∀ (x : ↑{x | IsAlgebraic R x}), ↑(aeval ↑x) (g x) = 0
f : R[X]
this : MapsTo Subtype.val (g ⁻¹' {f}) (rootSet f A)
⊢ Set.Countable (g ⁻¹' {f})

case this
R : Type u
A : Type v
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : IsDomain A
inst✝¹ : Algebra R A
inst✝ : NoZeroSMulDivisors R A
g : ↑{x | IsAlgebraic R x} → R[X]
hg₁ : ∀ (x : ↑{x | IsAlgebraic R x}), g x ≠ 0
hg₂ : ∀ (x : ↑{x | IsAlgebraic R x}), ↑(aeval ↑x) (g x) = 0
f : R[X]
⊢ MapsTo Subtype.val (g ⁻¹' {f}) (rootSet f A)

tactic: rintro x (rfl : g x = f)
state_before: case this
R : Type u
A : Type v
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : IsDomain A
inst✝¹ : Algebra R A
inst✝ : NoZeroSMulDivisors R A
g : ↑{x | IsAlgebraic R x} → R[X]
hg₁ : ∀ (x : ↑{x | IsAlgebraic R x}), g x ≠ 0
hg₂ : ∀ (x : ↑{x | IsAlgebraic R x}), ↑(aeval ↑x) (g x) = 0
f : R[X]
⊢ MapsTo Subtype.val (g ⁻¹' {f}) (rootSet f A)

tactic: exact mem_rootSet.2 ⟨hg₁ x, hg₂ x⟩
state_before: case this
R : Type u
A : Type v
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : IsDomain A
inst✝¹ : Algebra R A
inst✝ : NoZeroSMulDivisors R A
g : ↑{x | IsAlgebraic R x} → R[X]
hg₁ : ∀ (x : ↑{x | IsAlgebraic R x}), g x ≠ 0
hg₂ : ∀ (x : ↑{x | IsAlgebraic R x}), ↑(aeval ↑x) (g x) = 0
x : ↑{x | IsAlgebraic R x}
⊢ ↑x ∈ rootSet (g x) A