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

Flat sequences in LFS broken #544

Open
rappatoni opened this issue Oct 12, 2020 · 0 comments
Open

Flat sequences in LFS broken #544

rappatoni opened this issue Oct 12, 2020 · 0 comments
Assignees
Labels
bug LFS type checker Bugs related to the typechecker (incl. false positives and false negatives)

Comments

@rappatoni
Copy link
Contributor

rappatoni commented Oct 12, 2020

The following code exhibits several false positives and false negatives for the LFS flat sequence constructor:

namespace http://mathhub.info/Panoptikum/examples❚

theory flexary_connectives :ur:?LFS =
prop : type ❙
flexand  : {n} prop^n ⟶ prop❘# ⋀ 2❙
flex_impl : {n}prop^n ⟶ prop ⟶ prop❘# 2 %R⇒_ 1 3 prec 10❙
a:prop ❙
b: prop ❙
c: prop ❙
/T Should check: ❙
f: prop^1 ❘= ⟨a⟩❙
/T Should check: ❙
d : prop^2 ❘ = ⟨a,b⟩❙
/T Should not check: ❙
e : prop^3 ❘ = ⟨a,b⟩❙
/T Should check: ❙
andtest : prop ❘= ⋀ ⟨a,b⟩❙
/T Should check: ❙
andtesttwo : prop ❘ = flexand 2 ⟨a,b⟩❙
/T Should check: ❙
works = ⟨a⟩ ⇒_ 1 b ❙
/T Should not check: ❙
test = ⟨a⟩ ⇒_ 3 b ❙
/T Should check: ❙
test_two = ⟨a,b⟩ ⇒_ 2 c ❙
/T Should not check: ❙
test_three = ⟨a,b,b⟩ ⇒_ 1 b ❙
/T Should not check: ❙
test_four = ⟨a,b,b⟩ ⇒_ 5 b ❙
/T Should check: ❙
test_five = ⟨a,b,b⟩ ⇒_ 3 b ❙

❚

In summary, automatic inference of arity fails; when explicity provided with an arity, only the case for n=1 works. False positives abound when providing wrong arities.

@rappatoni rappatoni added bug type checker Bugs related to the typechecker (incl. false positives and false negatives) LFS labels Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug LFS type checker Bugs related to the typechecker (incl. false positives and false negatives)
Projects
None yet
Development

No branches or pull requests

2 participants