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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
|
true ? 0; 1
: nat
if true as x return (x ? nat; bool) then 0 else true
: nat
fun e : nat * nat => proj1 e
: nat * nat -> nat
decomp (true, true) as t, u in (t, u)
: bool * bool
! (0 = 0)
: Prop
forall n : nat, n = 0
: Prop
! (0 = 0)
: Prop
forall n : nat, # (n = n)
: Prop
forall n n0 : nat, ## (n = n0)
: Prop
forall n n0 : nat, ### (n = n0)
: Prop
3 + 3
: Z
3 + 3
: znat
[1; 2; 4]
: list nat
(1; 2, 4)
: nat * nat * nat
ifzero 3
: bool
pred 3
: nat
fun n : nat => pred n
: nat -> nat
fun n : nat => pred n
: nat -> nat
fun x : nat => ifn x is succ n then n else 0
: nat -> nat
1 -
: bool
-4
: Z
The command has indeed failed with message:
Cannot find where the recursive pattern starts.
The command has indeed failed with message:
in the right-hand side, y and z should appear in
term position as part of a recursive pattern.
The command has indeed failed with message:
The reference w was not found in the current environment.
The command has indeed failed with message:
in the right-hand side, y and z should appear in
term position as part of a recursive pattern.
The command has indeed failed with message:
z is expected to occur in binding position in the right-hand side.
The command has indeed failed with message:
as y is a non-closed binder, no such "," is allowed to occur.
The command has indeed failed with message:
Cannot find where the recursive pattern starts.
The command has indeed failed with message:
Cannot find where the recursive pattern starts.
The command has indeed failed with message:
Cannot find where the recursive pattern starts.
The command has indeed failed with message:
Cannot find where the recursive pattern starts.
The command has indeed failed with message:
Both ends of the recursive pattern are the same.
SUM (nat * nat) nat
: Set
FST (0; 1)
: Z
Nil
: forall A : Type, list A
NIL : list nat
: list nat
(false && I 3)%bool /\ I 6
: Prop
[|1, 2, 3; 4, 5, 6|]
: Z * Z * Z * (Z * Z * Z)
[|0 * (1, 2, 3); (4, 5, 6) * false|]
: Z * Z * (Z * Z) * (Z * Z) * (Z * bool * (Z * bool) * (Z * bool))
fun f : Z -> Z -> Z -> Z => {|f; 0; 1; 2|} : Z
: (Z -> Z -> Z -> Z) -> Z
{|fun x : Z => x + x; 0|}
: Z
{|op; 0; 1|}
: Z
false = 0
: Prop
Init.Nat.add
: nat -> nat -> nat
S
: nat -> nat
Init.Nat.mul
: nat -> nat -> nat
le
: nat -> nat -> Prop
plus
: nat -> nat -> nat
succ
: nat -> nat
Init.Nat.mul
: nat -> nat -> nat
le
: nat -> nat -> Prop
fun x : option Z => match x with
| SOME x0 => x0
| NONE => 0
end
: option Z -> Z
fun x : option Z => match x with
| SOME2 x0 => x0
| NONE2 => 0
end
: option Z -> Z
fun x : option Z => match x with
| SOME3 _ x0 => x0
| NONE3 _ => 0
end
: option Z -> Z
fun x : list ?T =>
match x with
| NIL => NONE3 (list ?T)
| (_ :') t => SOME3 (list ?T) t
end
: list ?T -> option (list ?T)
where
?T : [x : list ?T x1 : list ?T x0 := x1 : list ?T |- Type] (x, x1,
x0 cannot be used)
s
: s
10
: nat
fun _ : nat => 9
: nat -> nat
fun (x : nat) (p : x = x) =>
match p in (_ = n) return (n = n) with
| ONE => ONE
end = p
: forall x : nat, x = x -> Prop
fun (x : nat) (p : x = x) =>
match p in (_ = n) return (n = n) with
| 1 => 1
end = p
: forall x : nat, x = x -> Prop
bar 0
: nat
let k := rew [P] p in v in k
: P y
let k := rew [P] p in v in k
: P y
let k := rew <- [P] p in v' in k
: P x
let k := rew [P] p in v in k
: P y
let k := rew [P] p in v in k
: P y
let k := rew <- [P] p in v' in k
: P x
let k := rew [fun y : A => P y] p in v in k
: P y
let k := rew [fun y : A => P y] p in v in k
: P y
let k := rew <- [fun y : A => P y] p in v' in k
: P x
let k := rew [fun y : A => P y] p in v in k
: P y
let k := rew [fun y : A => P y] p in v in k
: P y
let k := rew <- [fun y : A => P y] p in v' in k
: P x
let k := rew dependent [P] p in v in k
: P y p
let k := rew dependent [P] p in v in k
: P y p
let k := rew dependent <- [P'] p in v' in k
: P' x (eq_sym p)
let k := rew dependent [P] p in v in k
: P y p
let k := rew dependent [P] p in v in k
: P y p
let k := rew dependent <- [P'] p in v' in k
: P' x (eq_sym p)
let k := rew dependent [P] p in v in k
: P y p
let k := rew dependent [P] p in v in k
: P y p
let k := rew dependent <- [P'] p in v' in k
: P' x (eq_sym p)
let k := rew dependent [fun y p => id (P y p)] p in v in k
: P y p
let k := rew dependent [fun y p => id (P y p)] p in v in k
: P y p
let k := rew dependent <- [fun y0 p => id (P' y0 p)] p in v' in k
: P' x (eq_sym p)
let k := rew dependent [P] p in v in k
: P y p
let k := rew dependent [P] p in v in k
: P y p
let k := rew dependent <- [P'] p in v' in k
: P' x (eq_sym p)
let k := rew dependent [fun y p0 => id (P y p0)] p in v in k
: P y p
let k := rew dependent [fun y p0 => id (P y p0)] p in v in k
: P y p
let k := rew dependent <- [fun y0 p0 => id (P' y0 p0)] p in v' in k
: P' x (eq_sym p)
rew dependent [P] p in v
: P y p
rew dependent <- [P'] p in v'
: P' x (eq_sym p)
rew dependent [fun a x => id (P a x)] p in v
: id (P y p)
rew dependent <- [fun a p' => id (P' a p')] p in v'
: id (P' x (eq_sym p))
|