(************************************************************************) (* * The Rocq Prover / The Rocq Development Team *) (* v * Copyright INRIA, CNRS and contributors *) (* <O___,, * (see version control and CREDITS file for authors & dates) *) (* \VV/ **************************************************************) (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (* * (see LICENSE file for the text of the license) *) (************************************************************************)
(* (c) Copyright 2006-2016 Microsoft Corporation and Inria. *)
Ltac T1 x := matchgoalwith |- _ => set t := (x in X in _ = X) end. Ltac T2 x := first [set t := (x in RHS)]. Ltac T3 x := first [set t := (x in Y in _ = Y)|idtac]. Ltac T4 x := set t := (x in RHS); idtac. Ltac T5 x := matchgoalwith |- _ => set t := (x in RHS) | |- _ => idtacend.
Lemma foo x y : x.+1 = y + x.+1. set t := (_.+1 in RHS). matchgoalwith |- x.+1 = y + t => rewrite /t {t} end. set t := (x in RHS). matchgoalwith |- x.+1 = y + t.+1 => rewrite /t {t} end. set t := (x in _ = x). matchgoalwith |- x.+1 = t => rewrite /t {t} end. set t := (x in X in _ = X). matchgoalwith |- x.+1 = y + t.+1 => rewrite /t {t} end. set t := (x in RHS). matchgoalwith |- x.+1 = y + t.+1 => rewrite /t {t} end. set t := (y + (1 + x) as X in _ = X). matchgoalwith |- x.+1 = t => rewrite /t addSn add0n {t} end. set t := x.+1. matchgoalwith |- t = y + t => rewrite /t {t} end. set t := (x).+1. matchgoalwith |- t = y + t => rewrite /t {t} end. set t := ((x).+1 in X in _ = X). matchgoalwith |- x.+1 = y + t => rewrite /t {t} end. set t := (x.+1 in RHS). matchgoalwith |- x.+1 = y + t => rewrite /t {t} end.
T1 (x.+1). matchgoalwith |- x.+1 = y + t => rewrite /t {t} end.
T2 (x.+1). matchgoalwith |- x.+1 = y + t => rewrite /t {t} end.
T3 (x.+1). matchgoalwith |- x.+1 = y + t => rewrite /t {t} end.
T4 (x.+1). matchgoalwith |- x.+1 = y + t => rewrite /t {t} end.
T5 (x.+1). matchgoalwith |- x.+1 = y + t => rewrite /t {t} end. rewrite [RHS]addnC. matchgoalwith |- x.+1 = x.+1 + y => rewrite -[RHS]addnC end. rewrite -[in RHS](@subnK 1 x.+1) //. matchgoalwith |- x.+1 = y + (x.+1 - 1 + 1) => rewrite subnK // end.
have H : x.+1 = y by myadmit. set t := _.+1 in H |- *. matchgoalwith H : t = y |- t = y + t => rewrite /t {t} in H * end. set t := (_.+1 in X in _ + X) in H |- *. matchgoalwith H : x.+1 = y |- x.+1 = y + t => rewrite /t {t} in H * end. set t := 0. matchgoalwith t := 0 |- x.+1 = y + x.+1 => clear t end. set t := y + _. matchgoalwith |- x.+1 = t => rewrite /t {t} end. set t : nat := 0. clear t. set t : nat := (x in RHS). matchgoalwith |- x.+1 = y + t.+1 => rewrite /t {t} end. set t : nat := RHS. matchgoalwith |- x.+1 = t => rewrite /t {t} end. (* set t := 0 + _. *) (* set t := (x).+1 in X in _ + X in H |-. *) (* set t := (x).+1 in X in _ = X.*) Admitted.
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.