You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the proof of last_ind in Seq.v, one needs to generalize a term []. This is done by elim: s [] Hnil, but this is currently not supported in Ssrlean.
Lemma last_ind P :
P [::] -> (forall s x, P s -> P (rcons s x)) -> forall s, P s.
Proof.
move=> Hnil Hlast s; rewrite -(cat0s s).
elim: s [::] Hnil => [|x s2 IHs] s1 Hs1; first by rewrite cats0.
by rewrite -cat_rcons; apply/IHs/Hlast.
Qed.
Here's the equivalent Lean proof:
theoremlast_ind (P : Seq α → Prop) :
P [] → (∀ s x, P s → P (rcons s x)) → ∀ s, P s := by
move=> Hnil Hlast s <;> srw -(cat0s s);
revert Hnil; generalize [] = s1; revert s1
elim: s=>[|x s2 IHs] s1 Hs1
{ sby srw cats0 }
{ sby srw -cat_rcons; apply IHs; apply Hlast }
The text was updated successfully, but these errors were encountered:
I tried implementing this, but ran into an issue with term taking over the case for ident when defining the elab_rules – I think there must be some way of properly defining priorities, but I couldn't figure it out.
In the proof of
last_ind
inSeq.v
, one needs to generalize a term[]
. This is done byelim: s [] Hnil
, but this is currently not supported in Ssrlean.Here's the equivalent Lean proof:
The text was updated successfully, but these errors were encountered: