Skip to content

Make level comparison sound and complete#339

Open
arthurpaulino wants to merge 1 commit intomainfrom
ap/kernel
Open

Make level comparison sound and complete#339
arthurpaulino wants to merge 1 commit intomainfrom
ap/kernel

Conversation

@arthurpaulino
Copy link
Member

Replace the incomplete level_leq heuristic with a complete algorithm:

  • Case-split on IMax: when IMax(a1, a2) has a2 that might be zero, substitute a param p from a2 with both Zero and Succ(p), checking the inequality in both cases
  • Handle Param(i) ≤ Succ(X) by recursing to Param(i) ≤ X
  • Distribute Succ over Max: Succ(Max(x,y)) → check Succ(x) and Succ(y)
  • Handle Param ≤ IMax on the right via the same case-split technique

Adds three helpers: level_has_param, level_any_param, level_subst_reduce.

Replace the incomplete level_leq heuristic with a complete algorithm:
- Case-split on IMax: when IMax(a1, a2) has a2 that might be zero,
  substitute a param p from a2 with both Zero and Succ(p), checking
  the inequality in both cases
- Handle Param(i) ≤ Succ(X) by recursing to Param(i) ≤ X
- Distribute Succ over Max: Succ(Max(x,y)) → check Succ(x) and Succ(y)
- Handle Param ≤ IMax on the right via the same case-split technique

Adds three helpers: level_has_param, level_any_param, level_subst_reduce.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant