News for hackers. Stuff that matters.
Re:What makes maths beautiful? by Animats on Tuesday July 18, 2017 @12:02AM (#14794186)
Equality should at least have the property that

    ∀ f, x = y ⇒ f(x) = f(y)
In a constructive theory like Boyer-Moore, all variables have a concrete representation, and functions can look into that representation. Thus, for EQUAL to have the property above, the representation must be the same.

In Boyer-Moore theory, there's no "hiding", in the sense of an object with private members. One could define a "weak equality" for sets which were lists of values, true if the same values were in both lists. Weak equality would not require that the lists have the same order. But you couldn't hide the representation. Functions could peek into the list representation, and the property above would not hold. So "weak equality" would not be very useful in proofs.

I once proposed a sort of "object oriented" extension to Boyer-Moore theory. The idea is that you create something like a set represented by lists, prove some theorems about such objects, and then "hide" the private functions that can look into the interior of the representation. Then you can define a weak equality function p. If you can prove ∀ f, p(x,y) ⇒ f(x) = f(y) for every non-hidden function, you have proven that p(x,y) ⇒ x = y. Then, p can be treated as equality. Proving this requires proving it for every function already defined. Any newly defined functions are composed from existing functions, so the equality still holds. There's trouble with newly defined types, though, because they come with some built-in functions such as the type predicate.

If you pursue this, you probably get to some theory of types, but I didn't want to go there, so I gave this up.

Re:What makes maths beautiful? by lomnakkus on Wednesday July 19, 2017 @07:07PM (#14808774)
> Equality should at least have the property that ∀ f, x = y ⇒ f(x) = f(y)

My impression was that even that might be a bit contentious[1]. Well, maybe not contentious, but maybe... disputable? It also requires a theory of functions, or at least a syntax to derivation rules.

That was just to be absurdly nitpicky, I think I understand what you're saying here, and it's much appreciated.

[1] https://pdfs.semanticscholar.org/806a/92153c4b8d344edec45eec...

Re:What makes maths beautiful? by eru on Wednesday July 19, 2017 @04:24AM (#14802711)
I think the type system along Haskell's lines can give you something like that? (Or go all the way to Agda, Idris, Coq etc.)