-
Notifications
You must be signed in to change notification settings - Fork 1
/
Uso_de_conjuncion.lean
85 lines (73 loc) · 1.42 KB
/
Uso_de_conjuncion.lean
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
-- ---------------------------------------------------------------------
-- Ejercicio. Sean m y n números naturales. Demostrar que si
-- m ∣ n ∧ m ≠ n
-- entonces
-- m ∣ n ∧ ¬ n ∣ m
-- ----------------------------------------------------------------------
import data.nat.gcd
open nat
variables {m n : ℕ}
-- 1ª demostración
-- ===============
example
(h : m ∣ n ∧ m ≠ n)
: m ∣ n ∧ ¬ n ∣ m :=
begin
cases h with h₀ h₁,
split,
exact h₀,
contrapose! h₁,
apply dvd_antisymm h₀ h₁,
end
-- Prueba
-- ======
/-
m n : ℕ,
h : m ∣ n ∧ m ≠ n
⊢ m ∣ n ∧ ¬n ∣ m
>> cases h with h₀ h₁,
h₀ : m ∣ n,
h₁ : m ≠ n
⊢ m ∣ n ∧ ¬n ∣ m
>> split,
| ⊢ m ∣ n
| >> exact h₀,
⊢ ¬n ∣ m
>> contrapose! h₁,
h₁ : n ∣ m
⊢ m = n
>> apply dvd_antisymm h₀ h₁,
no goals
-/
-- 2ª demostración
-- ===============
example
(h : m ∣ n ∧ m ≠ n)
: m ∣ n ∧ ¬ n ∣ m :=
begin
rcases h with ⟨h₀, h₁⟩,
split,
exact h₀,
contrapose! h₁,
apply dvd_antisymm h₀ h₁,
end
-- Prueba
-- ======
/-
m n : ℕ,
h : m ∣ n ∧ m ≠ n
⊢ m ∣ n ∧ ¬n ∣ m
>> rcases h with ⟨h₀, h₁⟩,
h₀ : m ∣ n,
h₁ : m ≠ n
⊢ m ∣ n ∧ ¬n ∣ m
>> split,
| ⊢ m ∣ n
| >> exact h₀,
⊢ ¬n ∣ m
>> contrapose! h₁,
h₁ : n ∣ m
⊢ m = n
>> apply dvd_antisymm h₀ h₁,
no goals
-/