Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add pigeonhole_principle #33

Merged
merged 2 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions library/Automata.v
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ Axiom run_dfa_nil: ∀ sigma, ∀ A: DFA sigma, ∀ u, run_dfa A u "" = u;
Axiom run_dfa_cons: ∀ sigma, ∀ A: DFA sigma, ∀ u, ∀ s, ∀ c, ∀ f: char → ℤ, f = nth (λ a: char, - 1) (edges_of_DFA A) u → ∀ v, v = f c → run_dfa A u (c :: s) = run_dfa A v s;

Todo run_dfa_append: ∀ sigma: list char, ∀ A: DFA sigma, ∀ u, ∀ a b, run_dfa A u (a + b) = run_dfa A (run_dfa A u a) b;
Axiom run_dfa_range: ∀ sigma: list char, ∀ A: DFA sigma, ∀ u, ∀ s, IsWord sigma s -> run_dfa A u s ∈ {i | 0 ≤ i ∧ i < |A| };

Axiom #1 Ldfa: ∀ sigma, DFA sigma → set (list char);
Axiom Ldfa_unfold: ∀ sigma, ∀ A: DFA sigma, ∀ s, s ∈ Ldfa A -> IsWord sigma s ∧ run_dfa A (start_of_DFA A) s ∈ accept_nodes_of_DFA A;
Expand Down
4 changes: 4 additions & 0 deletions library/EnumerativeCombinatorics.v
Original file line number Diff line number Diff line change
Expand Up @@ -1176,6 +1176,10 @@ Qed;
Todo valid_paren_cnt_right: ∀ a, valid_paren a -> ∀ k, 2 * k = |a| -> cnt ')' a = k;
Todo valid_paren_cnt_eq: ∀ a, valid_paren a -> cnt '(' a = cnt ')' a;

Todo pigeonhole_principle: ∀ pigeons pigeonholes: U, ∀ A: set pigeons, ∀ B: set pigeonholes,
|B| < |A| → ∀ f: pigeons → pigeonholes, projection A f ⊆ B
→ ∃ a b: pigeons, a ∈ A ∧ b ∈ A ∧ ~ a = b ∧ f a = f b;

Theorem count_of_lists: ∀ T: U, ∀ S: set T, ∀ m, 0 < m -> |S| = m -> ∀ n, 0 ≤ n -> |{ l: list T | member_set l ⊆ S ∧ |l| = n }| = m ^ n;
Proof;
intros;
Expand Down
1 change: 1 addition & 0 deletions library/List.v
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ Todo skipn_append_l: ∀ T: U, ∀ a b: list T, ∀ i: ℤ, |a| ≥ i -> skipn (
Todo skipn_append_r: ∀ T: U, ∀ a b: list T, ∀ i: ℤ, i ≥ 0 -> skipn (a + b) (|a| + i) = skipn b i;
Todo skipn_append_l_len: ∀ T: U, ∀ a b: list T, skipn (a + b) (|a|) = b;
Todo skipn_len: ∀ T: U, ∀ l: list T, skipn l (|l|) = [];
Todo len_skipn: ∀ T: U, ∀ l: list T, ∀ i, 0 ≤ i -> i ≤ |l| -> |skipn l i| = |l| - i;

Todo firstn_skipn: ∀ T: U, ∀ l: list T, ∀ i: ℤ, l = firstn l i + skipn l i;

Expand Down
Loading