chore: output tweaks
This commit is contained in:
parent
844933d57a
commit
ed85f01850
1 changed files with 23 additions and 4 deletions
27
formal.scm
27
formal.scm
|
@ -205,12 +205,13 @@
|
||||||
(return #f))))
|
(return #f))))
|
||||||
(proof-steps proof))
|
(proof-steps proof))
|
||||||
(when (or (member #f prems) (premises<=? goals prems))
|
(when (or (member #f prems) (premises<=? goals prems))
|
||||||
|
(printf "Proof complete!\n")
|
||||||
(return #t))
|
(return #t))
|
||||||
(format #t "Unsolved goals:\n~{~a\n~}~{⊢ ~a\n~}\n"
|
(printf "Unsolved goals:\n~{~a\n~}~{⊢ ~a\n~}\n"
|
||||||
prems (filter (lambda (g) (not (member g prems))) goals)))))
|
(reverse prems)
|
||||||
|
(filter (lambda (g) (not (member g prems))) goals)))))
|
||||||
|
|
||||||
;; TODO: i can just guess lol
|
;; TODO: this really isn't far from the macroless version....
|
||||||
;; this really isn't far from the macroless version....
|
|
||||||
(define and-comm
|
(define and-comm
|
||||||
(proof (p q)
|
(proof (p q)
|
||||||
(argument (p q)
|
(argument (p q)
|
||||||
|
@ -228,3 +229,21 @@
|
||||||
[p simplification]
|
[p simplification]
|
||||||
[q simplification]
|
[q simplification]
|
||||||
[(pand q p) conjunction]))
|
[(pand q p) conjunction]))
|
||||||
|
|
||||||
|
;; TODO: make this expressible better
|
||||||
|
;; TODO: use proofs for other proofs nicely
|
||||||
|
;; the mismatch between what is written and what is shown is hideous
|
||||||
|
;; avoidable by being explicit ig
|
||||||
|
(define and-assoc.inl
|
||||||
|
(proof (p q r)
|
||||||
|
(argument (p q r)
|
||||||
|
[(pand p (pand q r))]
|
||||||
|
[(pand (pand p q) r)])
|
||||||
|
[p simplification]
|
||||||
|
[(pand q r) simplification]
|
||||||
|
[q simplification]
|
||||||
|
[r simplification]
|
||||||
|
[(pand p q) conjunction]
|
||||||
|
[(pand (pand p q) r) conjunction]))
|
||||||
|
|
||||||
|
(proof-valid? and-assoc.inl)
|
||||||
|
|
Loading…
Reference in a new issue