| IDENT "exists" ->
TacticAst.Exists loc
| IDENT "fail" -> TacticAst.Fail loc
- | IDENT "fold"; kind = reduction_kind; p = pattern_spec ->
- TacticAst.Fold (loc, kind, p)
+ | IDENT "fold"; kind = reduction_kind; t = tactic_term; p = pattern_spec ->
+ TacticAst.Fold (loc, kind, t, p)
| IDENT "fourier" ->
TacticAst.Fourier loc
| IDENT "fwd"; hyp = IDENT; idents = OPT ident_list0 ->
| Exact of loc * 'term
| Exists of loc
| Fail of loc
- | Fold of loc * reduction_kind * ('term, 'ident) pattern
+ | Fold of loc * reduction_kind * 'term * ('term, 'ident) pattern
| Fourier of loc
| FwdSimpl of loc * string * 'ident list
| Generalize of loc * ('term, 'ident) pattern * 'ident option
| ElimType (_, term) -> "elim type " ^ pp_term_ast term
| Exact (_, term) -> "exact " ^ pp_term_ast term
| Exists _ -> "exists"
- | Fold (_, kind, pattern) ->
- sprintf "fold %s %s" (pp_reduction_kind kind) (pp_pattern pattern)
+ | Fold (_, kind, term, pattern) ->
+ sprintf "fold %s %s %s" (pp_reduction_kind kind)
+ (pp_term_ast term) (pp_pattern pattern)
| FwdSimpl (_, hyp, idents) ->
sprintf "fwd %s%s" hyp
(match idents with [] -> "" | idents -> " " ^ pp_idents idents)
(Tacticals.then_
~start:
(ReductionTactics.fold_tac ~reduction:CicReduction.whd
- ~pattern:
- (ProofEngineTypes.conclusion_pattern
- (Some
- (Cic.Appl
- [_Rle ; _R0 ;
- Cic.Appl
- [_Rmult ; int_to_real n ; Cic.Appl [_Rinv ; int_to_real d]]
- ]
- )))
- )
+ ~pattern:(ProofEngineTypes.conclusion_pattern None)
+ ~term:
+ (Cic.Appl
+ [_Rle ; _R0 ;
+ Cic.Appl
+ [_Rmult ; int_to_real n ; Cic.Appl [_Rinv ; int_to_real d]]]))
~continuation:
(Tacticals.then_
~start:(PrimitiveTactics.apply_tac ~term:_Rlt_not_le)
let normalize_tac ~pattern =
mk_tactic (reduction_tac ~reduction:CicReduction.normalize ~pattern );;
-let fold_tac ~reduction ~pattern =
+let fold_tac ~reduction ~term ~pattern =
(*
let fold_tac ~reduction ~pattern:(hyp_patterns,goal_pattern) ~term (proof,goal)
=
val normalize_tac: pattern:ProofEngineTypes.pattern -> ProofEngineTypes.tactic
val fold_tac:
- reduction:(Cic.context -> Cic.term -> Cic.term) ->
+ reduction:(Cic.context -> Cic.term -> Cic.term) -> term:Cic.term ->
pattern:ProofEngineTypes.pattern -> ProofEngineTypes.tactic
val fail : ProofEngineTypes.tactic
val fold :
reduction:(Cic.context -> Cic.term -> Cic.term) ->
+ term:Cic.term ->
pattern:ProofEngineTypes.pattern -> ProofEngineTypes.tactic
val fourier : ProofEngineTypes.tactic
val fwd_simpl :