(************************************************************************) (* * 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. *)
Lemma test (x : bool) : True.
have H1 x := x.
have (x) := x => H2.
have H3 T (x : T) := x.
have ? : bool := H1 _ x.
have ? : bool := H2 _ x.
have ? : bool := H3 _ x.
have ? (z : bool) : forall y : bool, z = z := fun y => refl_equal _.
have ? w : w = w := @refl_equal nat w.
have ? y : true by [].
have ? (z : bool) : z = z. exact: (@refl_equal _ z).
have ? (z w : bool) : z = z byexact: (@refl_equal _ z).
have H w (a := 3) (_ := 4) : w && true = w. byrewrite andbT. exact I. Qed.
Lemma test1 : True.
suff (x : bool): x = x /\ True. by move/(_ true); case=> _. split; first byexact: (@refl_equal _ x).
suff H y : y && true = y /\ True. bycase: (H true).
suff H1 /= : true && true /\ True. byrewrite andbT; split; [exact: (@refl_equal _ y) | exact: I]. matchgoalwith |- is_true true /\ True => idtacend. bysplit. Qed.
Lemma foo n : n >= 0.
have f i (j := i + n) : j < n. matchgoalwith j := i + n |- _ => idtacend.
Undo 2.
suff f i (j := i + n) : j < n.
done. matchgoalwith j := i + n |- _ => idtacend.
Undo 3.
done. Qed.
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.