Repository navigation
Expand file tree
/
Copy pathTactic.lp
More file actions
102 lines (67 loc) · 2.55 KB
/
Copy pathTactic.lp
File metadata and controls
102 lines (67 loc) · 2.55 KB
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
// tactic type
require open Stdlib.String Stdlib.Univ;
// mandatory builtins
constant symbol Tactic : TYPE;
builtin "Tactic" ≔ Tactic;
constant symbol #admit : Tactic;
builtin "admit" ≔ #admit;
constant symbol #all_hyps: (Π [l] [a:U l], η a → Tactic) → Tactic;
builtin "all_hyps" ≔ #all_hyps;
constant symbol #apply: Π [l] [a:U l], η a → Tactic;
builtin "apply" ≔ #apply;
constant symbol #assume : String → Π [l], Π [a:U l], (η a → Tactic) → Tactic;
builtin "assume" ≔ #assume;
constant symbol #assumption : Tactic;
builtin "assumption" ≔ #assumption;
constant symbol #change: Π [l] [a:U l], η a → Tactic;
builtin "change" ≔ #change;
constant symbol & : Tactic → Tactic → Tactic;
builtin "compose" ≔ &;
notation & infix right 10;
constant symbol #fail : Tactic;
builtin "fail" ≔ #fail;
constant symbol #first_hyp: (Π [l] [a:U l], η a → Tactic) → Tactic;
builtin "first_hyp" ≔ #first_hyp;
constant symbol #focus : String → Tactic;
builtin "focus" ≔ #focus;
constant symbol #generalize : Π [l] [a:U l], η a → Tactic;
builtin "generalize" ≔ #generalize;
constant symbol #have : String → Π [l] [a:U l], η a → Tactic;
builtin "have" ≔ #have;
constant symbol #induction : Tactic;
builtin "induction" ≔ #induction;
constant symbol #orelse : Tactic → Tactic → Tactic;
builtin "orelse" ≔ #orelse;
constant symbol #print : String → Tactic;
builtin "print" ≔ #print;
constant symbol #refine: String → Tactic;
builtin "refine" ≔ #refine;
constant symbol #reflexivity : Tactic;
builtin "reflexivity" ≔ #reflexivity;
constant symbol #remove : Π [l] [a:U l], η a → Tactic;
builtin "remove" ≔ #remove;
constant symbol #repeat : Tactic → Tactic;
builtin "repeat" ≔ #repeat;
symbol #rewrite : String → String → Π [l] [a:U l], η a → Tactic;
builtin "rewrite" ≔ #rewrite;
constant symbol #set : String → Π [l] [a:U l], η a → Tactic;
builtin "set" ≔ #set;
constant symbol #simplify : Tactic;
builtin "simplify" ≔ #simplify;
constant symbol #simplify_beta : Tactic;
builtin "simplify rule off" ≔ #simplify_beta;
constant symbol #solve : Tactic;
builtin "solve" ≔ #solve;
constant symbol #symmetry : Tactic;
builtin "symmetry" ≔ #symmetry;
constant symbol #try : Tactic → Tactic;
builtin "try" ≔ #try;
constant symbol #why3 : Tactic;
builtin "why3" ≔ #why3;
// defined tactics
symbol nothing ≔ #try #fail;
require open Stdlib.Nat;
symbol times : ℕ → Tactic → Tactic;
notation times infix 20;
rule 0 times _ ↪ nothing
with $n +1 times $t ↪ $t & $n times $t;