Is it possible to decide equality between two neutrals given a set of equalities between two neutrals then closed under congruence
It's just that I have a bunch of equalities x = a in my context where a is probably neutral but also x = a, x = b is a possible context, and I can't figure out how to decide a = b, if it is decideable at all
It should be since they're all just neutrals and no substitution is going on but my mental search engine isn't giving me any results for strategies
https://hackage.haskell.org/package/EqualitySolver-0.1.0.2/docs/EqualitySolver-Solver.html
drat I need fixed arities for my functions
I don't necessarily have that information
Like if I have f = g a, h = f b
, then h = g a b
should hold, but I don't know that g is a two place function?
I'm still not sure what to do about binders
It seems unsatisfactory that I treat values as opaque
For instance if I end up with \x. a = \x. b, I would like to additionally assert that forall x, a = b
Same with (x: A) -> B, and if A -> B = A' -> B' then A = A' and B = B'
The problem with binders is that they can only be instantiated by non-value neutrals? Otherwise substituting x = \y. c might reduce after all
I think I have a good idea of how I want to implement this, I'm going to be turning the AST itself into uninterpreted functions and constants and terms with binders into lambda terms, which for some reason is possible with SMT. But I promise not to do it today I promise I will go outside for my health and wellbeing
@ionchy maybe you could pass stuff into the solver as `app(app(g,a),b)` etc so everything has arity 0 except for Syntax Stuff..?
@niss smort
@ionchy congrue: to do with grues
@chrisamaphone @ionchy strongly suggests the existence of progrue
@ionchy can you do nelson-oppen like coq's congruence tactic
@niss ooh that sounds like that night be it. I'll just convert values (and... neutral case expressions...) into opaque "constants" and then opp a nelson
@andrejbauer @niss no, there's a step that does reduction as far as possible first, so before fst y enters my context it gets reduced fst y -> fst (a, b) -> a, and then x = a gets added if a no longer reduces further
I thought this was a graph problem, but if I have a = b and f = g I do want to equate f a = g b, as well as closure under symmetry and transitivity