Skip to content

Instantly share code, notes, and snippets.

View rao107's full-sized avatar

Anirudh Rao rao107

View GitHub Profile
@rao107
rao107 / Ch1-5Q1.lean
Created November 17, 2023 05:47
Chapter 1 Section 5 Q1 of Introduction to Topology by Mendelson
/-
The original problem is incorrect. Instead, we prove that the statement is true
if and only if either A or B is the universe
-/
example (h0 : X ⊆ A) (h1 : Y ⊆ B) :
A = Set.univ ∨ B = Set.univ ↔ (X ×ˢ Y)ᶜ = A ×ˢ Yᶜ ∪ Xᶜ ×ˢ B := by
apply Iff.intro
{
intro h2
rw [Set.compl_prod_eq_union, Set.union_comm]
@rao107
rao107 / 2022-06-17.py
Created June 17, 2022 21:57
Code for Riddler Classic on 6/17/22
def riddler_classic():
max_prob = 0
max_n = 0
for n in range(11, 100):
prob = 1
for i in range(0, 8):
prob *= (n - i) / (2 * n - i)
for i in range(0, 11):
prob *= (n - i) / (2 * n - 8 - i)