Questions tagged [proof]

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.

828 questions
4
votes
1 answer

Why does this SBV code stop before hitting the limit I set?

I have this theorem (not sure if that's the right word), and I want to get all the solutions. pairCube limit = do m <- natural exists "m" n <- natural exists "n" a <- natural exists "a" constrain $ m^3 .== n^2 constrain $ m .<…
Reed Oei
  • 1,427
  • 2
  • 13
  • 19
4
votes
1 answer

Proof by case analysis in Coq

I am trying to prove a Proposition about the following function: Program Fixpoint division (m:nat) (n:nat) {measure m} : nat := match lt_nat 0 n with | false => 0 | true => match leq_nat n m with | false => 0 | true => S (division…
Martin Copes
  • 931
  • 1
  • 7
  • 14
4
votes
2 answers

Well founded recursion in Coq

I am trying to write a function for computing natural division in Coq and I am having some trouble defining it since it is not structural recursion. My code is: Inductive N : Set := | O : N | S : N -> N. Inductive Bool : Set := | True : Bool …
Martin Copes
  • 931
  • 1
  • 7
  • 14
4
votes
3 answers

How would I prove that b = c if (andb b c = orb b c) in coq?

I'm new to coq and I'm trying to prove this... Theorem andb_eq_orb : forall (b c : bool), (andb b c = orb b c) -> (b = c). Here is my proof, but I get stuck when I get to the goal (false = true -> false = true). Proof. intros b c. induction…
Albtzrly
  • 924
  • 1
  • 6
  • 15
4
votes
2 answers

How to understand the time complexity of Kademlia node operation

I'm now learning Kademlia network by reading the classical paper Kademlia: A Peer-to-peer Information System Based on the XOR Metric. I want to understand the complexity of its operation but still cannot figure it out. In the 3 Sketch of proof…
Justin Yang
  • 87
  • 1
  • 8
4
votes
2 answers

Using the value of a computed function for a proof in agda

I'm still trying to wrap my head around agda, so I wrote a little tic-tac-toe game Type data Game : Player -> Vec Square 9 -> Set where start : Game x ( - ∷ - ∷ - ∷ - ∷ - ∷ - ∷ - ∷ - ∷ - ∷ [] ) xturn : {gs : Vec…
user833970
  • 2,729
  • 3
  • 26
  • 41
4
votes
3 answers

Proving Big-O Sum Rule?

I am unsure how to formally prove the Big O Rule of Sums, i.e.: f1(n) + f2(n) is O(max(g1(n)),g2(n)) So far, I have supposed the following in my effort: Let there be two constants c1 and c2 such that c2 > c1. By Big O definition: f1(n) <= c1g1(n)…
Rome_Leader
  • 2,518
  • 9
  • 42
  • 73
4
votes
4 answers

Minimum count of numbers to be inserted in [a,b] such that GCD of 2 consecutive numbers is 1

This question was asked in TopCoder - SRM 577. Given 1 <= a < b <= 1000000, what is the minimum count of numbers to be inserted between a & b such that no two consecutive numbers will share a positive divisor greater than 1. Example: a = 2184; b =…
baskar_p
  • 665
  • 5
  • 16
4
votes
4 answers

How do people prove the correctness of Computer Vision methods?

I'd like to pose a few abstract questions about computer vision research. I haven't quite been able to answer these questions by searching the web and reading papers. How does someone know whether a computer vision algorithm is correct? How do we…
solvingPuzzles
  • 8,541
  • 16
  • 69
  • 112
3
votes
1 answer

TAOCP Vol 1: Overflowing multiple stacks proof

I am self-studying TAOCP and trying to make sense of the solution to the following problem from Chapter 2.2.2 Linear Lists: Sequential Allocation. [30] If σ is any sequence of insertions and deletions such as (12), let s0 (σ) be the number of…
Cam Miller
  • 61
  • 3
3
votes
1 answer

Theorem and Proof Environment in Beamer

I am currently trying to use quarto beamer to making lecture slides. I would like to use the theorem environment in beamer, the qmd file however cannot render properly. Rendering stopped with latex error showing that Command \theorem already…
3
votes
1 answer

Programmatic proofs for monad laws

In haskell, the users do not have to prove that their monads satisfy the monad laws. return a >>= k = k a m >>= return = m m >>= (\x -> k x >>= h) = (m >>= k) >>= h If I understand correctly, even if…
Student
  • 400
  • 3
  • 10
3
votes
1 answer

Creating Coq tactic: how to use a newly generated name?

I want to create a Coq tactic that looks something like the following. I assert a proposition named H, I prove that proposition, and then I use simpl within that proposition. The tactic would look something like this: Tactic Notation "foo" := …
Sambo
  • 189
  • 7
3
votes
2 answers

Ada GNATprove insints that 1 is not >= 0

I am trying to prove, that my algorithm for finding second largest value in array works as it should. This is my code: function FindMax2 (V : Vector) return Integer is Max : Natural := 0; SecondMax : Natural := 0; begin for I in V'Range…
pucikplay
  • 101
  • 4
3
votes
1 answer

Idris "did not change type" for rewrite with exact same type

Context I'm trying to write a version of ++ for Vect where the compiler can infer the resulting Vect has the expected contents. Detail I'm struggling to see why this second rewrite isn't working import Data.Vect import Data.Nat infixl 9 ++: public…
joel
  • 6,359
  • 2
  • 30
  • 55