Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

theory_hol.lp: rename T into ⊤ and F into ⊥ #161

Merged
merged 4 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ TODO

- why the mapping of ITLIST does not work anymore ?

- in lp output, replace T by ⊤ ?

- write progress in an ocaml program, and estimate time wrt size of files

- use a single term_abbrev file for each theorem, and split it
Expand Down
10 changes: 5 additions & 5 deletions erasing.lp
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ builtin "ex_def" ≔ ∃_def;
builtin "not" ≔ ¬;
builtin "not_def" ≔ ¬_def;

builtin "True" ≔ T;
builtin "T_def" ≔ T_def;
builtin "True" ≔ ;
builtin "T_def" ≔ ⊤_def;

builtin "False" ≔ F;
builtin "F_def" ≔ F_def;
builtin "False" ≔ ;
builtin "F_def" ≔ ⊥_def;

builtin "ex1" ≔ ∃₁;
builtin "ex1_def" ≔ ∃₁_def;

// natural deduction rules
builtin "Logic.I" ≔ Tᵢ;
builtin "Logic.I" ≔ ⊤ᵢ;
builtin "conj" ≔ ∧ᵢ;
builtin "proj1" ≔ ∧ₑ₁;
builtin "proj2" ≔ ∧ₑ₂;
Expand Down
6 changes: 3 additions & 3 deletions theory_hol.lp
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ opaque symbol SYM [a] [x y : El a] (xy: Prf (= x y)) : Prf (= y x) ≔
/* HOL-Light derived connectives */
constant symbol ∃₁ [A] : El (fun (fun A bool) bool);
constant symbol ¬ : El (fun bool bool);
constant symbol F : El bool;
constant symbol : El bool;
constant symbol ∨ : El (fun bool (fun bool bool));
constant symbol ∃ [A] : El (fun (fun A bool) bool);
constant symbol ∀ [A] : El (fun (fun A bool) bool);
constant symbol ⇒ : El (fun bool (fun bool bool));
constant symbol ∧ : El (fun bool (fun bool bool));
constant symbol T : El bool;
constant symbol : El bool;

/* Natural deduction rules */
rule Prf (⇒ $p $q) ↪ Prf $p → Prf $q;
rule Prf (∀ $p) ↪ Π x, Prf ($p x);
symbol Tᵢ : Prf T;
symbol ⊤ᵢ : Prf ;
symbol ∧ᵢ [p : El bool] : Prf p → Π [q : El bool], Prf q → Prf (∧ p q);
symbol ∧ₑ₁ [p q : El bool] : Prf (∧ p q) → Prf p;
symbol ∧ₑ₂ [p q : El bool] : Prf (∧ p q) → Prf q;
Expand Down
4 changes: 3 additions & 1 deletion xlp.ml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ let name =
| "==>" -> "⇒"
| "!" -> "∀"
| "?" -> "∃"
| "F" -> "⊥"
| "T" -> "⊤"
| "?!" -> "∃₁"
| "~" -> "¬"
| "-->" -> "⟶" (* 27F6 *)
Expand Down Expand Up @@ -504,7 +506,7 @@ let proof tvs rmap =
int oc (pos_first (fun th -> concl th = t) !the_axioms);
list_prefix " " typ oc (type_vars_in_term t);
list_prefix " " term oc (frees t)
| Ptruth -> string oc "Tᵢ"
| Ptruth -> string oc "⊤ᵢ"
| Pconj(k1,k2) -> string oc "∧ᵢ "; sub_at oc k1; char oc ' '; sub_at oc k2
| Pconjunct1 k -> string oc "∧ₑ₁ "; sub_at oc k
| Pconjunct2 k -> string oc "∧ₑ₂ "; sub_at oc k
Expand Down
Loading