Metamath Proof Explorer


Theorem posqsqznn

Description: When a positive rational squared is an integer, the rational is a positive integer. zsqrtelqelz with all terms squared and positive. (Contributed by SN, 23-Aug-2024)

Ref Expression
Hypotheses posqsqznn.1 φ A 2
posqsqznn.2 φ A
posqsqznn.3 φ 0 < A
Assertion posqsqznn φ A

Proof

Step Hyp Ref Expression
1 posqsqznn.1 φ A 2
2 posqsqznn.2 φ A
3 posqsqznn.3 φ 0 < A
4 2 qred φ A
5 0red φ 0
6 5 4 3 ltled φ 0 A
7 4 6 sqrtsqd φ A 2 = A
8 7 2 eqeltrd φ A 2
9 zsqrtelqelz A 2 A 2 A 2
10 1 8 9 syl2anc φ A 2
11 7 10 eqeltrrd φ A
12 elnnz A A 0 < A
13 11 3 12 sylanbrc φ A