Project 'nomadic-labs/coq-tezos-of-ocaml' was moved to 'formal-land/coq-tezos-of-ocaml'. Please update any links and bookmarks that may still have the old path.
The source project of this merge request has been removed.
Added proof for substr_l_eq
1 unresolved thread
1 unresolved thread
Added the proof along with helper lemma for substr_l_eq
Merge request reports
Activity
12 12 13 13 (* @TODO *) 14 14 (** The substring left identity *) 15 Axiom substr_l_eq : forall {s1 s2}, 15 Lemma conc : forall {s1 : string}, - Comment on lines -15 to +15
OK cool for the proofs! Here is a proof suggestion using our practices:
(** The substring left identity *) Lemma conc {s1 : string} : s1 ++ "" = s1. Proof. induction s1; sfirstorder. Qed. Lemma subss {s1 : string} : substring 0 (length s1) s1 = s1. Proof. induction s1; sfirstorder. Qed. Lemma zerozero {s1 : string} : substring 0 0 s1 = "". Proof. sauto lq: on. Qed. Lemma substr_l_eq {s1 s2} : String.sub (s1 ++ s2) 0 (String.length s1) = s1. Proof. induction s1; simpl. { apply zerozero. } { unfold String.sub, String.length, CoqOfOCaml.String.length in *. rewrite Nat2Z.id in *; simpl in *. sfirstorder. } Qed.
Notes:
-
sfirstorder
andsauto
are obtained from running the tacticbest
https://coqhammer.github.io/ - We separate sub-goals with
{ ... }
- We put the parameters of the lemma on the left of the
:
so that there are lessintros
to do.
-
Merged as !568 (merged)
Please register or sign in to reply