https://github.com/vityaman-edu/math-logic-deduction-theorem
Math Logic course lab: Deduction theorem.
https://github.com/vityaman-edu/math-logic-deduction-theorem
bison cpp yacc
Last synced: about 1 month ago
JSON representation
Math Logic course lab: Deduction theorem.
- Host: GitHub
- URL: https://github.com/vityaman-edu/math-logic-deduction-theorem
- Owner: vityaman-edu
- License: apache-2.0
- Created: 2023-01-12T08:20:25.000Z (over 3 years ago)
- Default Branch: trunk
- Last Pushed: 2023-03-27T21:03:12.000Z (over 3 years ago)
- Last Synced: 2025-02-28T16:05:44.892Z (over 1 year ago)
- Topics: bison, cpp, yacc
- Language: C++
- Homepage:
- Size: 91.8 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# math-logic-deduction-theorem
```c
bool is_axiom_1(expression* e) {
// (1) a -> (b -> a)
if (e->type() != IMPLICATION) return false;
auto base_impl = e->as_binary();
auto a = base_impl->left();
auto right = base_impl->right();
if (right->type() != IMPLICATION) return false;
auto right_impl = right->as_binary();
auto b = right_impl->left();
auto a1 = right_impl->right();
if (a->is_equal_to(a1)) return true;
return false;
}
bool is_axiom(expression* e) {
if (is_axiom_1(e)) return true;
// 2
// 3
// 4
// 5
// 6
// 7
// 8
// 9
// 10
}
```