;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;  MDH - updated 071117; MDH  2006 - extraction of realizers from 
;;;  a proof  of the Induction Axiom for Quantifier-Free (qfr) formulas 
;;;  The IA is proved, as usual, in terms of the Induction Rule (IR)
;;;  The particular realizer is feasible and we can display it
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(load "~/minlog/init.scm")
(set! COMMENT-FLAG #f)
(libload "nat.scm")
(mload "../modules/diatup.scm")
(mload "../examples/diatup/IndAxiom/IndAxSrc.scm")
(av "A" (py "nat => boole"))
;;;;; (define Ind_Fmla (pf "(A 0) -> (all n. (A n) -> (A (n+1))) -> all m (A m)"))
(define IndAcnst  (all-formulas-to-ind-aconst (pf "all n (A n)")))
(define vatmp (time (DIA-IndAx-extract 'light IndAcnst)))
(define untup (tmpair-to-tuple (vatmpair-to-tmpair vatmp)))
(define tmlst (tmtuple-to-tmlist untup))
(length tmlst)
(set! COMMENT-FLAG #t)
(set! UNFOLDING-FLAG #t)
(define LDet (nt (car tmlst)))
;;;  ; (pp LDet)
(pp (time (nt (make-term-in-app-form LDet  (pt "3")))))
