Theorem: WeierstrassCurve.Jacobian.addMap_of_Z_eq_zero_left
File: Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean

tactic: rcases Q with ⟨Q⟩
state_before: R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
Q : PointClass F
hP : W.Nonsingular P
hQ : W.NonsingularLift Q
hPz : P z = 0
⊢ W.addMap ⟦P⟧ Q = Q
state_after: case mk
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
Q✝ : PointClass F
hP : W.Nonsingular P
hPz : P z = 0
Q : Fin 3 → F
hQ : W.NonsingularLift (Quot.mk Setoid.r Q)
⊢ W.addMap ⟦P⟧ (Quot.mk Setoid.r Q) = Quot.mk Setoid.r Q

tactic: by_cases hQz : Q z = 0
state_before: case mk
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
Q✝ : PointClass F
hP : W.Nonsingular P
hPz : P z = 0
Q : Fin 3 → F
hQ : W.NonsingularLift (Quot.mk Setoid.r Q)
⊢ W.addMap ⟦P⟧ (Quot.mk Setoid.r Q) = Quot.mk Setoid.r Q
state_after: case pos
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
Q✝ : PointClass F
hP : W.Nonsingular P
hPz : P z = 0
Q : Fin 3 → F
hQ : W.NonsingularLift (Quot.mk Setoid.r Q)
hQz : Q z = 0
⊢ W.addMap ⟦P⟧ (Quot.mk Setoid.r Q) = Quot.mk Setoid.r Q

case neg
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
Q✝ : PointClass F
hP : W.Nonsingular P
hPz : P z = 0
Q : Fin 3 → F
hQ : W.NonsingularLift (Quot.mk Setoid.r Q)
hQz : ¬Q z = 0
⊢ W.addMap ⟦P⟧ (Quot.mk Setoid.r Q) = Quot.mk Setoid.r Q

tactic: erw [addMap_eq, add_of_Z_eq_zero hP hQ hPz hQz,
  smul_eq _ <| (isUnit_X_of_Z_eq_zero hP hPz).pow 2, Quotient.eq]
state_before: case pos
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
Q✝ : PointClass F
hP : W.Nonsingular P
hPz : P z = 0
Q : Fin 3 → F
hQ : W.NonsingularLift (Quot.mk Setoid.r Q)
hQz : Q z = 0
⊢ W.addMap ⟦P⟧ (Quot.mk Setoid.r Q) = Quot.mk Setoid.r Q
state_after: case pos
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
Q✝ : PointClass F
hP : W.Nonsingular P
hPz : P z = 0
Q : Fin 3 → F
hQ : W.NonsingularLift (Quot.mk Setoid.r Q)
hQz : Q z = 0
⊢ ![1, 1, 0] ≈ Q

tactic: exact Setoid.symm <| equiv_zero_of_Z_eq_zero hQ hQz
state_before: case pos
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
Q✝ : PointClass F
hP : W.Nonsingular P
hPz : P z = 0
Q : Fin 3 → F
hQ : W.NonsingularLift (Quot.mk Setoid.r Q)
hQz : Q z = 0
⊢ ![1, 1, 0] ≈ Q
state_after: no goals

tactic: erw [addMap_eq, add_of_Z_eq_zero_left hP.left hPz hQz,
  smul_eq _ <| (isUnit_X_of_Z_eq_zero hP hPz).mul <| Ne.isUnit hQz]
state_before: case neg
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
Q✝ : PointClass F
hP : W.Nonsingular P
hPz : P z = 0
Q : Fin 3 → F
hQ : W.NonsingularLift (Quot.mk Setoid.r Q)
hQz : ¬Q z = 0
⊢ W.addMap ⟦P⟧ (Quot.mk Setoid.r Q) = Quot.mk Setoid.r Q
state_after: case neg
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
Q✝ : PointClass F
hP : W.Nonsingular P
hPz : P z = 0
Q : Fin 3 → F
hQ : W.NonsingularLift (Quot.mk Setoid.r Q)
hQz : ¬Q z = 0
⊢ ⟦Q⟧ = Quot.mk Setoid.r Q

tactic: rfl
state_before: case neg
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
Q✝ : PointClass F
hP : W.Nonsingular P
hPz : P z = 0
Q : Fin 3 → F
hQ : W.NonsingularLift (Quot.mk Setoid.r Q)
hQz : ¬Q z = 0
⊢ ⟦Q⟧ = Quot.mk Setoid.r Q
state_after: no goals