A mathematical proof is any mathematical argument which demonstrates the truth of a mathematical statement. Informal proofs are typically rendered in natural language and are held true by consensus; formal proofs are typically rendered symbolically and can be checked mechanically. "Proofs" can be valid or invalid; only the former kind constitutes actual proof, whereas the latter kind usually refers to a flawed attempt at proof.
Questions tagged [proof]
828 questions
3
votes
1 answer
Proving Select Sort algorithm using SPARK
I am trying to prove that my implementation of Select Sort in Ada is correct. I have tried a few loop invariants, but using gnatprove only proves inner loop's invariant:
package body Selection with SPARK_Mode is
procedure Sort (A : in out Arr) is
…

pucikplay
- 101
- 4
3
votes
1 answer
how to do a proof for subset in Isabelle
I'm trying to do some proofs manually in Isabelle but I'm struggling with the following proof:
lemma "(A ∩ B) ∪ C ⊆ A ∪ C "
I'm trying to transform it Propositional Logic then prove it.
So here's what I tried:
lemma "(A ∩ B) ∪ C ⊆ A ∪ C "
…

user206904
- 504
- 4
- 16
3
votes
1 answer
Proof of consistent heuristic implies admissible condition
I was trying to prove that consistent heuristic implies the admissible condition
one of the proofs that I read was mentioned here:
let h(n) be the heuristic value at node n and c(n,n+1) the cost from node n to node n+1.
we are given the assumption…

yaminoyuki
- 293
- 1
- 11
3
votes
2 answers
Bipartite connected graph proof
A friend presented me with a conjecture that seems to be true but neither of us can come up with a proof. Here's the problem:
Given a connected, bipartite graph with disjoint non-empty vertex sets U and V, such that |U|<|V|, all vertices are in…

Joe Kelley
- 289
- 2
- 5
3
votes
2 answers
How to prove `theorem : ¬ ⊤ ≡ ⊥` in Agda?
Following The Haskell Road to Logic, Maths and Programming, one can find p.48 Theorem 2.12.1 ¬ ⊤ ≡ ⊥ and its converse ¬ ⊥ ≡ ⊤
The book uses Haskell and assumes
⊥ = False
⊤ = True
which would yield the Agda type theorem : (p q : Bool) → not p ≡ q…

Raoul
- 1,872
- 3
- 26
- 48
3
votes
2 answers
How proof assistants are implemented?
What are the main blocks of a proof assistant?
I am just interested in knowing the internal logic of proof checking. For example, topics about graphical user interfaces of such assistants do not interest me.
A similar question to mine has been…

Aleph
- 1,343
- 1
- 12
- 27
3
votes
2 answers
Proof of Correctness of Codeforces Problem: Boxers (rated 1500)
Consider this problem appearing in Codeforces (rated 1500):
There are n boxers, the weight of the i-th boxer is ai. Each of them can change the weight by no more than 1 before the competition (the weight cannot become equal to zero, that is, it…

Shiladitya Mukherjee
- 65
- 1
- 7
3
votes
1 answer
Stuck proving lemma with unprovable subgoals
I'm trying to prove a lemma that's based on the following definitions.
Section lemma.
Variable A : Type.
Variable P : A -> Prop.
Variable P_dec : forall x, {P x}+{~P x}.
Inductive vector : nat -> Type :=
| Vnil : vector O
| Vcons : forall…

yarwest
- 873
- 8
- 19
3
votes
1 answer
Proving (~A -> ~B)-> (~A -> B) -> A in Coq
I have been trying to prove the following tautology in Coq.
Theorem Axiom3: forall A B: Prop, (~A -> ~B)-> ((~A -> B) -> A).
My plan was the to do following
Theorem Axiom3: forall A B: Prop, (~A -> ~B)-> ((~A -> B) -> A).
Proof.
intros A B.
…

cj1996
- 31
- 4
3
votes
2 answers
Dividing players into "winners" and "losers": how to prove that greedy solution gives optimal result?
I have a problem that states the following:
n players (where n is even) are to a play games against each other. Everyone will not necessarily play but a player can only play against someone else once. If two people do decide to play against each…

Ayumu Kasugano
- 440
- 4
- 13
3
votes
1 answer
How to use obtain to make forward elimination proofs easier to read?
I'm trying to do basic natural deduction proofs in Isabelle, following this document (particularly slide 23).
I know I can do things like
theorem ‹(A ⟶ B) ⟶ A ⟶ B›
proof -
{
assume ‹A ⟶ B›
{
assume ‹A›
with ‹A ⟶ B› have ‹B› ..
…

Nick Hu
- 43
- 3
3
votes
1 answer
Congruence of Type Level Nats in Haskell
I am trying to implement a version of Braun Tree in Haskell, which requires me to prove this fact about Nats
If n :~: m, then n + 1 :~: m + 1
However, I am failing to fill the undefined below. I tried Refl, but the type system complains.
import…

Agnishom Chattopadhyay
- 1,971
- 14
- 32
3
votes
1 answer
Help with Big Omega Proof?
I am having trouble solving a proof. Where t(n) <= cn^1.6, c being a constant. In general, Big Omega is the opposite of Big O in that it is the best case scenerio and looks for the lower bound. So there exists a c and and n0 such that n >= n0. But I…

deedex11
- 61
- 1
- 3
- 9
3
votes
1 answer
Does the Dijkstra algorythm need to check all vertices?
I recently had to take a look at the Dijkstra algorithm and it's proof.
The proof of the algorithm terminates in all sources I could find with the equality of quantity of all vertices and the quantity of all vertices visited (e.g. R=V or S=V).…

BenStudio
- 51
- 1
- 4
3
votes
3 answers
How to prove decidability of a partial order inductive predicate?
Context
I am trying to define the partial order A ≤ B ≤ C with a relation le in Coq and prove that it is decidable: forall x y, {le x y} + {~le x y}.
I succeeded to do it through an equivalent boolean function leb but cannot find a way to prove it…

authchir
- 1,605
- 14
- 26