Earlier quoted context omitted.
You still need to construct the algorithm in the first place, which is what a constructive proof does.
Sure, but you would not need to prove it in a constructive way. See, that is one of the problems with constructive mathematics. It not only requires you to write down the algorithm, but also to prove it constructively, although a non-constructive proof would be perfectly fine. In other words: constructivism is often overkill.
Formalising Mathematics: An Introduction
51–60 of 125 posts
Re: Formalising Mathematics: An Introduction
#52Earlier quoted context omitted.
It's mathematics where certain kinds of proof by contradiction are not allowed -- if you want to prove that something exists because you want to use it, then you have to make it, you can't just say "let's assume it didn't exist and go on from there to deduce that 0 = 1 which is definitely wrong, so our assumption is wrong, so it exists, so let's use it". Here is the reason why it's obvious for mathematicians. If you'…
I'd say it is still a pretty constructive answer, as you can run both codes, get two concrete answers, and one of them is guaranteed to be right.
In Kevin's example where you have two programs, one which depends on the Riemann hypothesis being true and the other which depends on it being false, is that you can't just execute the programs -- they might have undefined behavior since they depend on the truth of some statement during their executions, and there's no general algorithm to decide whether undefined behavior is happening. They depend on undecided facts, so you can't put them together into a single program that decides the result. (Maybe a slogan is "truth can be contingent, but data cannot be.")
In Lean syntax, this is an example type signature of something that takes two programs (h and h') that respectively take in the truth/proof of a proposition or its negation, along with a proof that there is at most one element of α, and produces that element. I don't think there's a way to write this definition in Lean without marking the definition noncomputable:
def extract {p : Prop} {α : Type*}
(h : p → α) (h' : ¬p → α)
(unique : ∀ (x y : α), x = y) : α := sorry
(the sorry indicates a missing definition).Re: Formalising Mathematics: An Introduction
#53A game to try this out (by Kevin Buzzard, who is participating in this thread and is also the author of this blog post). https://wwwf.imperial.ac.uk/~buzzard/xena/natural_number_gam... I loved it and have been trying to make some subsequent levels about divisibility.
I think I had expectations that it would be a lot less ... tedious? Like I was hoping it would be mostly automated except needing hints whenever it got stuck. Much like how the flavor text would hint to you (the human) that you needed to use certain theorems for certain levels.
Instead, it was so low level that you had to do every step of algebra manually with a line of code each. (and to be fair, in the beginning it was necessary because you're developing the usual rules of algebra as you go, but even in the later levels after they tell you about the ring tactic there's still a lot of manual algebra you need to do) The search space seems small enough that even I was just mindlessly spamming rewrite/intro/apply/induction. Why can't a computer automate this completely.
And going in the other direction, I was hoping this would be a good tool to aid in proofwriting. But most of the "proof" I wrote was complete gibberish not meant for human consumption. I think the problem is because the code relies heavily on mutating a context that you can't see without using the lean UI.
Anyway, maybe the number game is just not a good intro to the full capabilities of lean and I am missing the point.
Re: Formalising Mathematics: An Introduction
#54Earlier quoted context omitted.
Sure, but you would not need to prove it in a constructive way. See, that is one of the problems with constructive mathematics. It not only requires you to write down the algorithm, but also to prove it constructively, although a non-constructive proof would be perfectly fine. In other words: constructivism is often overkill.
But everything you'd typically see in an algorithm has decidable equality, so proofs by contradiction are constructively justified, no?
Re: Formalising Mathematics: An Introduction
#55Re: Formalising Mathematics: An Introduction
#56The only major problem (IMO) is that Lean and the others (Coq, Hol, Isabelle, Agda, Idris, etc...) are all pretty hard to read. Check out "Automated Propositional Sequent Proofs in Your Browser with Tau Prolog" for a promising approach: https://www.philipzucker.com/javascript-automated-proving/ It's rendering LaTeX proof trees.
Re: Formalising Mathematics: An Introduction
#57Earlier quoted context omitted.
But everything you'd typically see in an algorithm has decidable equality, so proofs by contradiction are constructively justified, no?
I don't know! But I don't think so. Also think about other properties of an algorithm, like runtime, etc. You could have a non-constructive proof for the upper bound on the runtime, but not a constructive one.
Re: Formalising Mathematics: An Introduction
#58Earlier quoted context omitted.
There does not seem to be any reason for mathematicians to be turned about by these engines using constructive mathematics. One can use excluded middle as an axiom and do all the classical mathematics one likes. What becomes much easier if the engine is constructive is telling which theorems depend on excluded middle and which do not.
This is in fact how Lean works - the basic logic is constructive and excluded middle is an "extra" axiom. But even that is not as elegant as just writing non-constructive statements in the negative fragment of the logic, where (AIUI) one can already reason classically with no need for extra axioms.
Re: Formalising Mathematics: An Introduction
#59Earlier quoted context omitted.
But everything you'd typically see in an algorithm has decidable equality, so proofs by contradiction are constructively justified, no?
I don't know! But I don't think so. Also think about other properties of an algorithm, like runtime, etc. You could have a non-constructive proof for the upper bound on the runtime, but not a constructive one.
My algorithm: If a + b == c then output 1. If a^2 + b^2 == c^2 then output 2. Stop.
This algorithm is correct, because Fermat's last theorem holds. Now, try to come up with a simpler algorithm than that, and one that in addition has a constructive proof.
Re: Formalising Mathematics: An Introduction
#60I will pay $3.14 to the first person that formalizes mathematics using only https://treenotation.org/ .
This appears to just be saying “using python style indentation to represent trees”? I don’t understand the significance. Like, yeah, you can express whatever tree you want that way. Plenty of other ways to represent trees. It’s a nice enough default if you don’t know anything about the sort of thing the tree will contain. But there’s a reason that when writing conditionals, we don’t put each symbol in the expression…
I won't disagree with you. However when you zoom out and crunch the numbers, you'll find that although there are infinite expressions to put in conditionals, in practice an absolutely minuscule amount of those patterns are actually used.
Context free grammars are not free.
Better ways are coming.