Theorem: LinearRecurrence.sol_eq_of_eq_init
File: Mathlib/Algebra/LinearRecurrence.lean

tactic: refine' Iff.intro (fun h x _ ↦ h ▸ rfl) _
state_before: α : Type u_1
inst✝ : CommSemiring α
E : LinearRecurrence α
u v : ℕ → α
hu : IsSolution E u
hv : IsSolution E v
⊢ u = v ↔ Set.EqOn u v ↑(range E.order)

tactic: intro h
state_before: α : Type u_1
inst✝ : CommSemiring α
E : LinearRecurrence α
u v : ℕ → α
hu : IsSolution E u
hv : IsSolution E v
⊢ Set.EqOn u v ↑(range E.order) → u = v

tactic: set u' : ↥E.solSpace := ⟨u, hu⟩
state_before: α : Type u_1
inst✝ : CommSemiring α
E : LinearRecurrence α
u v : ℕ → α
hu : IsSolution E u
hv : IsSolution E v
h : Set.EqOn u v ↑(range E.order)
⊢ u = v

tactic: set v' : ↥E.solSpace := ⟨v, hv⟩
state_before: α : Type u_1
inst✝ : CommSemiring α
E : LinearRecurrence α
u v : ℕ → α
hu : IsSolution E u
hv : IsSolution E v
h : Set.EqOn u v ↑(range E.order)
u' : { x // x ∈ solSpace E } := { val := u, property := hu }
⊢ u = v

tactic: change u'.val = v'.val
state_before: α : Type u_1
inst✝ : CommSemiring α
E : LinearRecurrence α
u v : ℕ → α
hu : IsSolution E u
hv : IsSolution E v
h : Set.EqOn u v ↑(range E.order)
u' : { x // x ∈ solSpace E } := { val := u, property := hu }
v' : { x // x ∈ solSpace E } := { val := v, property := hv }
⊢ u = v

tactic: suffices h' : u' = v'
state_before: α : Type u_1
inst✝ : CommSemiring α
E : LinearRecurrence α
u v : ℕ → α
hu : IsSolution E u
hv : IsSolution E v
h : Set.EqOn u v ↑(range E.order)
u' : { x // x ∈ solSpace E } := { val := u, property := hu }
v' : { x // x ∈ solSpace E } := { val := v, property := hv }
⊢ ↑u' = ↑v'

tactic: exact h' ▸ rfl
state_before: α : Type u_1
inst✝ : CommSemiring α
E : LinearRecurrence α
u v : ℕ → α
hu : IsSolution E u
hv : IsSolution E v
h : Set.EqOn u v ↑(range E.order)
u' : { x // x ∈ solSpace E } := { val := u, property := hu }
v' : { x // x ∈ solSpace E } := { val := v, property := hv }
h' : u' = v'
⊢ ↑u' = ↑v'

case h'
α : Type u_1
inst✝ : CommSemiring α
E : LinearRecurrence α
u v : ℕ → α
hu : IsSolution E u
hv : IsSolution E v
h : Set.EqOn u v ↑(range E.order)
u' : { x // x ∈ solSpace E } := { val := u, property := hu }
v' : { x // x ∈ solSpace E } := { val := v, property := hv }
⊢ u' = v'

tactic: rw [← E.toInit.toEquiv.apply_eq_iff_eq, LinearEquiv.coe_toEquiv]
state_before: case h'
α : Type u_1
inst✝ : CommSemiring α
E : LinearRecurrence α
u v : ℕ → α
hu : IsSolution E u
hv : IsSolution E v
h : Set.EqOn u v ↑(range E.order)
u' : { x // x ∈ solSpace E } := { val := u, property := hu }
v' : { x // x ∈ solSpace E } := { val := v, property := hv }
⊢ u' = v'

tactic: ext x
state_before: case h'
α : Type u_1
inst✝ : CommSemiring α
E : LinearRecurrence α
u v : ℕ → α
hu : IsSolution E u
hv : IsSolution E v
h : Set.EqOn u v ↑(range E.order)
u' : { x // x ∈ solSpace E } := { val := u, property := hu }
v' : { x // x ∈ solSpace E } := { val := v, property := hv }
⊢ ↑(toInit E) u' = ↑(toInit E) v'

tactic: exact_mod_cast h (mem_range.mpr x.2)
state_before: case h'.h
α : Type u_1
inst✝ : CommSemiring α
E : LinearRecurrence α
u v : ℕ → α
hu : IsSolution E u
hv : IsSolution E v
h : Set.EqOn u v ↑(range E.order)
u' : { x // x ∈ solSpace E } := { val := u, property := hu }
v' : { x // x ∈ solSpace E } := { val := v, property := hv }
x : Fin E.order
⊢ ↑(toInit E) u' x = ↑(toInit E) v' x