File: Apply.v

package info (click to toggle)
coq 8.0pl2-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 14,228 kB
  • ctags: 17,685
  • sloc: ml: 97,070; makefile: 1,255; sh: 738; lisp: 456; awk: 15
file content (26 lines) | stat: -rw-r--r-- 940 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
(************************************************************************)
(*  v      *   The Coq Proof Assistant  /  The Coq Development Team     *)
(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
(*   \VV/  **************************************************************)
(*    //   *      This file is distributed under the terms of the       *)
(*         *       GNU Lesser General Public License Version 2.1        *)
(************************************************************************)

(* This needs unification on type *)

Goal (n,m:nat)(eq nat (S m) (S n)).
Intros.
Apply f_equal.

(* f_equal : (A,B:Set; f:(A->B); x,y:A)x=y->(f x)=(f y) *)
(* and A cannot be deduced from the goal but only from the type of f, x or y *)


(* This needs step by step unfolding *)

Fixpoint T [n:nat] : Prop := Cases n of O => True | (S p) => n=n->(T p) end.
Require Arith.

Goal (T (3))->(T (1)).
Intro H.
Apply H.