Skip to content

Commit

Permalink
Add subproof level check for iff
Browse files Browse the repository at this point in the history
  • Loading branch information
Mroik committed Jul 25, 2024
1 parent 4f87287 commit 4c23040
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 1 addition & 3 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ impl App {
| State::OrState(OrState::EliminateGetAssumption) => {
("And expression to eliminate", true)
}
State::AndState(AndState::EliminateGetProposition(_)) => {
("Resulting expression", true)
}
State::AndState(AndState::EliminateGetProposition(_)) => ("Resulting expression", true),
State::OrState(OrState::EliminateGetLeftSubproof(_))
| State::OrState(OrState::EliminateGetRightSubproof(_, _))
| State::ImpliesState(ImpliesState::Introduce)
Expand Down
6 changes: 6 additions & 0 deletions src/fitch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,12 @@ impl Fitch {
Some(v) => v,
};

if self.current_level != self.statements.get(left_sub).unwrap().0 - 1
|| self.current_level != self.statements.get(right_sub).unwrap().0 - 1
{
return false;
}

if !(left_start == right_end && left_end == right_start) {
return false;
}
Expand Down

0 comments on commit 4c23040

Please sign in to comment.