# Why Is A Math Proof Like A Unit Test

A crowd-sourced conference wiki!
Working together is better. :)

• Speakers, for example:
• Recent Conferences

##### Clone this wiki locally

From Gogaruco 2012

Presenter: Daniela Wellisz

http://math-tdd-slides.herokuapp.com/

## Intro

Name is from: Why is a raven like a writing desk?

Always wanted to be a mathematician
Mathematicians don't need to think about reality
Mathematicians live in the world of concept
Care about context of problem, not necessarily a solution
Transitioned into Rails very quickly because TDD from the very get-go
How does TDD relate to Math since I love them both so much?

### Induction

Recursion is based on induction
Induction is away to prove things about integers
If its true for 1, its true for 2, therefore, recursively, its true for all integers

#### Summation Notation

Sigma notation
A mathematical loop
Placement around sigma indicates location in equation
(see slides)

### Integers

A programmers concept of an integer is different than a mathematicians
A mathematicians uses axioms
(see slides for Axiom of Induction)

You can't stub something out that means anything

Everything in Ruby is an Object
7 is an instance of an Integer
In Math, 7 comes with a lot of baggage

### TDD is not a proof

Your test suite isn't a proof that you code works
Its important to understand which function it provides
Unit tests are heuristics rather than proofs Before you solve a problem, you have to understand it