<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Tags on Neeraj Adhikari's blog</title><link>https://blog.nradk.com/tags/</link><description>Recent content in Tags on Neeraj Adhikari's blog</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><atom:link href="https://blog.nradk.com/tags/index.xml" rel="self" type="application/rss+xml"/><item><title>My home servers are not a homelab</title><link>https://blog.nradk.com/posts/homelab/</link><pubDate>Sun, 29 Jun 2025 18:25:00 -0700</pubDate><guid>https://blog.nradk.com/posts/homelab/</guid><description>&lt;p>First, what is a homelab? While I don&amp;rsquo;t think there&amp;rsquo;s a dictionary definition, a homelab seems to refer loosely to the collection of servers, networking gear, and supporting infrastructure that someone has set up in their home, for experimentation and learning, either for fun or to develop skills.&lt;/p>
&lt;p>Naturally, homelabs can take a wide variety of sizes and shapes. Take a quick look around &lt;em>/r/homelab&lt;/em> on Reddit, and you&amp;rsquo;ll find setups ranging from a &lt;a href="https://www.reddit.com/r/homelab/comments/fcvyto/my_old_and_broken_android_phone_as_multipurpose/">single old Android phone&lt;/a> to a &lt;a href="https://www.reddit.com/r/homelab/comments/w4sov1/im_building_my_own_home_data_center_ama/">full-fledged data center&lt;/a>. Whatever the scale, the ethos of the subreddit (and other Homelab communities I&amp;rsquo;ve seen outside of Reddit) seems to be centered around learning, experimentation and playing around. People often have big, expensive and crazy setups just for the heck of it.&lt;/p>
&lt;p>At my home, I have a setup that looks like a homelab. It consists of a small rack housing a few computers, a switch, and a few other supporting pieces of hardware. But I don&amp;rsquo;t consider this a homelab, because I don&amp;rsquo;t use it as a &lt;em>lab&lt;/em>. It sits there, running the ten or so services I self-host for me and my family. When I work on it, it is for regular maintenance, incremental improvement, or to install new services. I do enjoy working on it, and I&amp;rsquo;ve learned a lot along the way, but these are merely side effects.&lt;/p>
&lt;p>So I hesitate to call it a homelab, and there&amp;rsquo;s this small lexical vacuum here&amp;mdash;no other word applies well. &amp;lsquo;Home server&amp;rsquo; comes close, but it feels strange to refer to the whole setup, consisting of multiple servers and other non-server equipment, in the singular as a &amp;lsquo;home server&amp;rsquo;. &amp;lsquo;Home servers&amp;rsquo; isn&amp;rsquo;t ideal either. I usually just refer it to as my &amp;lsquo;self-hosting setup&amp;rsquo;. Yeah, I know I&amp;rsquo;m splitting hairs&amp;mdash;it isn&amp;rsquo;t that big of a deal what you call things. But I think it is interesting that within the set of people who keep servers in their home, there are two subsets (with considerable overlap) whose reasons for doing so are sort of orthogonal. The &amp;lsquo;homelab&amp;rsquo; moniker perfectly fits one group, and it would be nice for the self-hosters whose setups are not homelabs to have a cool name too. &amp;lsquo;HomeCloud&amp;rsquo;? &amp;lsquo;HomeProd&amp;rsquo;? Stick to &amp;lsquo;home server(s)&amp;rsquo;? I don&amp;rsquo;t have any good ideas.&lt;/p>
&lt;hr>
&lt;p>&lt;em>This post was discussed in &lt;a href="https://news.ycombinator.com/item?id=44418424">Hacker News&lt;/a>.&lt;/em>&lt;/p></description></item><item><title>De-googling, so far</title><link>https://blog.nradk.com/posts/degoogling/</link><pubDate>Wed, 29 May 2024 21:22:20 -0700</pubDate><guid>https://blog.nradk.com/posts/degoogling/</guid><description>&lt;p>Over the past few years, I have tried to gradually reduce or eliminate my use of
Google products and services. It has been difficult to ditch Google&amp;rsquo;s products
in some categories, and in some others, it has been nigh impossible. Here, I
list the services I have tried to find alternatives for, discuss the ease (or
lack thereof) of finding a satisfactory alternative, and rant about my
experience so far.&lt;/p>
&lt;p>Before we begin, I feel like I should put a few important caveats out of the
way. First, these are notes from personal experience, and are not a
comprehensive review of alternatives to Google&amp;rsquo;s offerings. If you are looking
for comparisons of alternatives, they are not here. Second, using some of the
alternatives I mention requires having a self-hosted server setup of some sort,
which for many people will be entirely out of the question.&lt;/p>
&lt;h2 id="search">Search&lt;/h2>
&lt;p>I have used DuckDuckGo as my primary search engine for the past six or seven
years, and although it has its flaws, it has been adequate. The problem with
DuckDuckGo is that in many cases, it doesn&amp;rsquo;t seem to show a good understanding
of the search query, for lack of a better way to put it. It takes my search
terms too literally. It&amp;rsquo;s saving grace, though, is the &amp;lsquo;bang&amp;rsquo; feature: if you
decide that the results are not what you hoped for and you wish to go to Google
instead, just add a &lt;code>!g&lt;/code> in your search. This works not just for Google but for
a long list of websites, and I find this feature incredibly handy when I know
beforehand that I want to search a particular website, like Wikipedia, YouTube
or Amazon.&lt;/p>
&lt;p>After reading constant praise for it on HackerNews, I tried
&lt;a href="https://kagi.com/">Kagi&lt;/a> for couple of months last year. Kagi has a lot of
strengths. Just out of the box, it&amp;rsquo;s results are markedly better than DuckDuckGo
and perhaps even Google. Their feature to up-rank or down-rank websites of your
choosing is an absolute lifesaver. Not having to wade through SEO&amp;rsquo;d junk to find
what I need prevents a lot of frustration. That said, I had two major issues
with Kagi. First, their cheapest subscription tier has a limit of 300 searches
monthly, and I would find myself running against the limit halfway into the
billing period. I would have gladly paid for the unlimited tier, if not for my
second issue with Kagi: privacy-wise, I simply don&amp;rsquo;t believe that a service that
requires login and thus naturally associates all your activity with your
identity is better than a service which can be used without a login. So I&amp;rsquo;m
sticking to DuckDuckGo for the time being.&lt;/p>
&lt;h2 id="e-mail">E-Mail&lt;/h2>
&lt;p>Unlike Search and many other categories in this list, it is not difficult to
find a capable alternative e-mail service. I personally use
&lt;a href="https://proton.me/mail">ProtonMail&lt;/a> and &lt;a href="https://fastmail.com">Fastmail&lt;/a>.
Proton positions itself as the privacy-focused option, and claim to have
end-to-end encryption. They bundle e-mail with storage, calendar, VPN and a
password manager at a very reasonable rate. I will continue using ProtonMail as
one of my email accounts, but I don&amp;rsquo;t like the fact it is difficult to use
third-party email clients with their service. Yes, that is due to how they do
end-to-end encryption, and I don&amp;rsquo;t have a reason to doubt their honesty, but is
it &lt;em>really&lt;/em> end-to-end encryption if you don&amp;rsquo;t have sole ownership and full
control of your keys?&lt;/p>
&lt;p>Besides moving away from Google, I also decided I want to own the whole of my
email address, including the domain name. So, a year and a half ago I started
using Fastmail with a custom domain. A feature of Fastmail I like and use all
the time is masked email, but in fairness a lot of services provide this feature
these days. Unlike Proton, FastMail makes no claims of extreme privacy, but I
lke it because it has a nice and clean web UI and it works with my favorite FOSS
e-mail client on Android.&lt;/p>
&lt;h2 id="photos">Photos&lt;/h2>
&lt;p>Back in the days when Google Photos had free unlimited photo storage, it was
pretty much unbeatable. Yes, the resolution was capped to 16 megapixels, but
during the time I relied on Google Photos, I didn&amp;rsquo;t have a phone with a camera
capable of much higher resolution. After Google axed the unlimited storage,
other photo storage services seem pretty competitive with Google Photos. At a
glance, Microsoft OneDrive, iCloud, Amazon Photos and DropBox all seem like
options I would at least consider. But I have not tried any of those services
and have no plans to do so, because I self-host a personal instance of
&lt;a href="https://immich.app/">Immich&lt;/a> to store all my photos. In just a couple of years,
Immich has gone from zero to having a very rich feature-set, and although it
doesn&amp;rsquo;t have a stable release yet, it is stable enough for me. Using the
&lt;a href="https://github.com/simulot/immich-go">immich-go&lt;/a> CLI tool, it is a breeze to
import media from your Google Takeout export to Immich as well.&lt;/p>
&lt;h2 id="drive">Drive&lt;/h2>
&lt;p>Cloud storage of files is an easy switch: there are many, many file storage
providers available with very competitive pricing. For myself, I initially used
a &lt;a href="https://nextcloud.com/">Nextcloud&lt;/a> instance I self-host. I still have some of
my files in Nextcloud, but I found it to be slow when syncing a large amount of
files, so I opted for a simpler solution. All my important files are now in a
directory in my home server, and when I need access to them I just mount the
directory in my laptop with &lt;code>sshfs&lt;/code>. In case I need a web interface, I have a
&lt;a href="https://filebrowser.org/">FileBrowser&lt;/a> instance running. Side note: I love how
simple FileBrowser is. It does the things I need and not a thing more.&lt;/p>
&lt;p>I realize switching to a different storage provider will be more difficult for
people who use Google Drive for collaboration and need to share files often with
other people. Fortunately, in my case what I needed was just to not lose my
files if my laptop goes belly up, and to be able to occasionally access
important files from my phone.&lt;/p>
&lt;h2 id="calendar-and-contacts">Calendar and Contacts&lt;/h2>
&lt;p>Using most calendar and contacts clients with different providers, and switching
between them, is more or less straightforward thanks to the
&lt;a href="https://en.wikipedia.org/wiki/CalDAV">CalDAV&lt;/a> and
&lt;a href="https://en.wikipedia.org/wiki/CardDAV">CardDAV&lt;/a> open protocols. I use my
NextCloud instance as the server for both, and it works flawlessly. On the
client side, I use &lt;a href="https://github.com/FossifyOrg">Fossify&lt;/a> Calendar and
GrapheneOS&amp;rsquo;s default contacts app along with &lt;a href="https://www.davx5.com/">DavX5&lt;/a> to
facilitate the synchronization. I recently discovered that the Calendar and
Contacts apps that come with the Gnome Desktop Environment support CalDAV and
CardDAV as well, so that&amp;rsquo;s neat! I can now view or update my calendar and
contact list from my phone, laptop or the browser!&lt;/p>
&lt;p>For people who can&amp;rsquo;t or don&amp;rsquo;t want to self-host a Nextcloud instance, there are
plenty of &amp;lsquo;cloud productivity suite&amp;rsquo; providers that provide file storage,
calendar, contact and email services with a single account. Microsoft Outlook
and Apple iCloud are the most popular ones, but privacy-focused alternatives
like Proton are growing.&lt;/p>
&lt;h2 id="phone">Phone&lt;/h2>
&lt;p>Let me begin by saying that I am extremely grateful that
&lt;a href="https://grapheneos.org/">GrapheneOS&lt;/a> exists. It is Android but with privacy and
security features that severely limit the capacity of big tech to spy on you.
This includes Google itself, as GrapheneOS by default comes without all the apps
and services that Google includes on a regular Android phone. Optionally, you
can install Google Play Services, but as a regular, &amp;lsquo;sandboxed&amp;rsquo; app: which means
Google has the same privilege as any other app in your phone, and you can decide
what permissions to allow it. But the catch is&amp;hellip; well, there are several.
Whether or not you&amp;rsquo;ll find them acceptable depends on where your preference lies
in the privacy-convenience trade-off scale. Because unfortunately, you must
sacrifice one to get more of the other. The first issue is that it only runs on
Google Pixel devices. This is because the GrapheneOS project has a &lt;a href="https://grapheneos.org/faq#future-devices">sizable list
of security and support requirements&lt;/a>
that a device will need to fulfill to be supported, and apparently only Google
Pixel devices do at the moment. If you already have a Pixel phone (like I did
when I first decided to try GrapheneOS), this is not an issue. If you don&amp;rsquo;t
already have one though, you&amp;rsquo;ll have to make a decision about whether you want
to support Google&amp;rsquo;s business by buying a device they produce, even though you&amp;rsquo;re
doing that so you can give Google less control of your digital life. To me, that
feels like an acceptable trade-off.&lt;/p>
&lt;p>The other issue is that many apps will either not work, or will be partially
broken. I have used GrapheneOS for a total of 16 months in two stints, 8 months
each in two devices; first a Pixel 3a and now a Pixel 7. Until about 2 months
ago, I used it without the (sandboxed) Google Play Services. In this
configuration, there is a whole category of applications you cannot use: most
prominently, banking and finance apps will just refuse to work. Many apps that
work will have some features broken: notifications in particular will be missing
for a lot of apps. Some apps will keep complaining that your phone does not have
Google Play Services and thus is not supported, but still continue to mostly
work (looking at you, Snapchat). But I found I could still manage. Apps like
Telegram, Signal and Whatsapp use their own notification delivery mechanism, so
they aren&amp;rsquo;t impacted as long as you turn off battery optimization for them. All
the banks I have accounts with have mobile websites that work reasonably well. I
was even able to take trips through Uber&amp;rsquo;s mobile website, which was a pleasant
surprise. The location functionality did not work, but I believe that was due
more to the browser than to Uber itself. I tried to get as many apps as possible
from F-droid, the app store for open-source Android apps. For proprietary apps,
I used Aurora store, which is an alternative open-source client for the Google
Play Store. Not ideal, but better than manually downloading APKs from websites
like APKPure and APKMirror.&lt;/p>
&lt;p>About two months ago, in a moment of frustration, I decided to install the
sandboxed Google Play Services and Google Play Store to see if that would
improve my experience. Some things are noticeably better: for instance,
notifications work for all apps, installing new apps is way easier, and I can
install and use some financial apps without issues. It is still far from the
regular Android experience; for instance, apps don&amp;rsquo;t auto-update, you have to
manually go into Google Play Store and update them. This is unfortunate, but you
necessarily lose some functionality when you limit the god-like permissions
Google has on a regular Android device.&lt;/p>
&lt;p>Slight tangent: one of my big gripes here is with Android Auto. Contrary to what
the name might suggest, Android Auto is not part of the &lt;a href="https://source.android.com/">Android Open Source
Project (AOSP)&lt;/a>. Instead &lt;a href="https://en.wikipedia.org/wiki/Android_Auto">it is a proprietary
standard&lt;/a>, and the Android Auto app
on your phone is a proprietary app that has privileged access to your system. If
I want turn-by-turn navigation in my car&amp;rsquo;s head unit out of an open-source maps
app on my phone, that is simply not possible without a privileged, proprietary
app in between to mediate. Before January 2024, it was not even possible to use
Android Auto in GrapheneOS, but now it is at least supported, although it does
depend on the sandboxed Google Play being installed as well.&lt;/p>
&lt;p>Every time I am frustrated with the state of things with GrapheneOS, I think
about getting an iPhone, using it without any Google apps, and enjoying the
&amp;lsquo;just works&amp;rsquo; nature of Apple products. But then I would be handing over control
of a large part of my digital life to another big tech company, so I haven&amp;rsquo;t
bought an iPhone yet. Apple does like to make a big deal of at least pretending
to care more about your privacy than the rest of Big Tech, but I would rather
not rely on promises if I can, and where possible, use open-source software
stacks I can trust. So I&amp;rsquo;m sticking with GrapheneOS on my Pixel, at least for
the near future.&lt;/p>
&lt;h2 id="maps">Maps&lt;/h2>
&lt;p>&lt;a href="https://www.openstreetmap.org">OpenStreetMap&lt;/a> is a fantastic dataset and in
many cases, is better than Google Maps in terms of map accuracy. I use it a lot.
But Google Maps is much more than just the map data: it has client apps across
different platforms with a consistent interface, routing and turn-by-turn
navigation, public transport information, live traffic data, and most
importantly for me, business reviews and opening hours. For the last one,
Google&amp;rsquo;s sheer size means that the network effects are on their side, and I&amp;rsquo;m
not aware of any effort to create an open dataset of business reviews. All this
means that it is difficult to quit Google Maps entirely. OpenStreetMap-based
apps like &lt;a href="https://organicmaps.app/">Organic Maps&lt;/a> are great and I frequently
use them, but I find myself using the Google Maps website a lot, for tasks like
searching for restaurants to getting an estimate of how long my commute is going
to take.&lt;/p>
&lt;h2 id="video">Video&lt;/h2>
&lt;p>The sad reality here is that YouTube essentially has no alternative. Yes, it is
technologically difficult to deliver video to the internet in a way that is
cost-effective, but the problem that is orders of magnitude more difficult is
that of building a critical mass of creators and viewers that the network effect
takes over. All the creators are on YouTube, so everyone goes there for content.
All the viewers are on YouTube, so creators put their videos there. There are
platforms that are trying to provide an alternative, but they are mostly unknown
to the general populace. I have never given serious thought to
&lt;a href="https://en.wikipedia.org/wiki/PeerTube">PeerTube&lt;/a> because I don&amp;rsquo;t know of any
creators I watch that upload their videos to a PeerTube instance. I think
&lt;a href="https://nebula.tv">Nebula.tv&lt;/a> is promising, and a bunch of creators I like
upload their videos on it. I do have a Nebula account but rarely end up using
it, since most videos get uploaded to YouTube as well, and when I open Nebula, I
find myself having already watched all the interesting videos on YouTube.&lt;/p>
&lt;h2 id="conclusion">Conclusion&lt;/h2>
&lt;p>At this point in time, it is exceedingly difficult to fully avoid using Google
products and services, and you&amp;rsquo;ll need to sacrifice a lot of convenience in your
attempts to use alternatives. Nevertheless, capable and privacy-friendly
alternatives exist for many product segments in which Google dominates, and I
think it is worthwhile to reduce your dependence on Google where you can. If you
are so inclined, self-hosting can provide even more freedom and privacy.&lt;/p>
&lt;hr>
&lt;p>&lt;em>This post was discussed in &lt;a href="https://news.ycombinator.com/item?id=40539031">Hacker News&lt;/a>.&lt;/em>&lt;/p></description></item><item><title>Algorithmic Poems</title><link>https://blog.nradk.com/posts/algorithmic-poems/</link><pubDate>Mon, 14 Jan 2019 00:00:00 +0000</pubDate><guid>https://blog.nradk.com/posts/algorithmic-poems/</guid><description>&lt;blockquote>
&lt;p>This post was first published in my old blog, hosted at &lt;code>blog.neerajadhikari.com.np&lt;/code>.
I have since taken down the old blog and copied some of its posts here.&lt;/p>
&lt;/blockquote>
&lt;p>While there are now algorithms left and right writing poetry (or, depending on
your opinion, writing stuff that is not quite poetry), let&amp;rsquo;s talk about
something even more interesting - poetry that describe algorithms.
Surprisingly, I couldn&amp;rsquo;t find more than a few such poems. It is difficult
enough to exactly and concisely express most algorithms even in prose, so
perhaps it is not so surprising after all. But simpler, elegant algorithms are
relatively easier to express in prose and as we shall see, poetry. As we can
expect, these poems do not provide a complete specification of algorithms, but
nevertheless describe their general working very well. Here I list the ones
that I have found, and I&amp;rsquo;ll keep expanding this list as I hopefully find more
in the future.&lt;/p>
&lt;h2 id="sieve-of-eratosthenes">Sieve of Eratosthenes&lt;/h2>
&lt;blockquote>
&lt;p>Sift the Two&amp;rsquo;s and Sift the Three&amp;rsquo;s,&lt;br>
The Sieve of Eratosthenes.&lt;br>
When the multiples sublime,&lt;br>
The numbers that remain are Prime.&lt;br>&lt;br>
&amp;ndash; Anonymous&lt;/p>
&lt;/blockquote>
&lt;p>The &lt;a href="https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes">sieve of
Eratosthenes&lt;/a> is an
ancient algorithm for finding all primes up to a given limit. It is a simple
algorithm, discovered by the Greek mathematician Eratosthenes of Cyrene
millennia before there were computers or even the formal study of algorithms.
It works by starting with a list of all natural numbers less than a limit and
crossing out multiples of discovered primes one by one, starting with two. Once
there are no bigger primes to cross out multiples off, the algorithm ends and
all numbers that remain unmarked are primes.&lt;/p>
&lt;h2 id="gradient-descent">Gradient Descent&lt;/h2>
&lt;blockquote>
&lt;p>Still the fog persists.&lt;br>
Let the incline have its way&lt;br>
and set your compass.&lt;br>&lt;br>
Keep taking footsteps&lt;br>
until that first suspicion&lt;br>
of an uphill slope&lt;br>&lt;br>
then turn left or right,&lt;br>
just one of many zig-zags.&lt;br>
Will it ever end?&lt;br>&lt;/p>
&lt;/blockquote>
&lt;p>This poem by Michael Bartholomew-Biggs appears in his paper titled &lt;a href="https://www.researchgate.net/publication/282948019_Poetry_Algorithms">Algorithms
and Poetry&lt;/a>, along with other poems describing algorithms for
optimization problems. This one describes the gradient descent or steepest
descent method of finding the minimum of a function in possibly
high-dimensional space. It is the most common method used for optimizing neural
network weights. It works by starting at some initial position and gradually
moving in the direction (in the input space) of the steepest descent of the
function value. The algorithm stops at the &amp;ldquo;first suspicion of an uphill
slope&amp;rdquo;, or the point from which there is no way downhill. The fog in the poem
refers to the fact that at a time we can only &amp;lsquo;observe&amp;rsquo; the immediate
surroundings of the point we are at, instead of the entire topography.&lt;/p>
&lt;h2 id="spanning-tree-protocol">Spanning Tree Protocol&lt;/h2>
&lt;blockquote>
&lt;p>I think that I shall never see&lt;br>
A graph more lovely than a tree.&lt;br>&lt;br>
A tree whose crucial property&lt;br>
Is loop-free connectivity.&lt;br>&lt;br>
A tree which must be sure to span&lt;br>
So packets can reach every LAN.&lt;br>&lt;br>
First the root must be selected.&lt;br>
By ID it is elected.&lt;br>&lt;br>
Least cost paths from root are traced.&lt;br>
In the tree these paths are placed.&lt;br>&lt;br>
A mesh is made by folks like me&lt;br>
Then bridges find a spanning tree.&lt;/p>
&lt;/blockquote>
&lt;p>This one by &lt;a href="https://en.wikipedia.org/wiki/Radia_Perlman">Radia Perlman&lt;/a> is my
favorite. It describes the algorithm for the &lt;a href="https://en.wikipedia.org/wiki/Spanning_Tree_Protocol">Spanning Tree Protocol&lt;/a>, which is used implemented by
layer-2 bridges in a network which may have cycles in the topology which lead
to &lt;em>broadcast radiation&lt;/em>, the situation when broadcast frames flood the
network. To prevent that, the bridges compute a loop-free subset of the network
topology that spans the entire network, in other words, a spanning tree. The
algorithm runs on each bridge in the network, and they communicate by sending
out configuration messages to their neighboring bridges. First they agree on a
root bridge for the tree based on an ID derived from the MAC address, and keep
the links that provide shortest distance paths to the root bridge in the
spanning tree. The links not in the spanning tree are deactivated.&lt;/p>
&lt;p>While working at Digital Equipment Corporation (DEC), Radia Perlman was tasked
with developing a constant-memory protocol that enabled bridges to locate loops
in a local area network. Legend says that she was given a week to finish the
job, but she invented the protocol in a day and spent the rest of the time
writing this poem.&lt;/p>
&lt;p>&lt;em>Do you know of, or have yourself written, a poem that describes an algorithm?
If so, send it to me and I&amp;rsquo;ll add it to the list.&lt;/em>&lt;/p></description></item><item><title>Proving 1 > 0</title><link>https://blog.nradk.com/posts/proving-one-greater-than-zero/</link><pubDate>Mon, 10 Dec 2018 00:00:00 +0000</pubDate><guid>https://blog.nradk.com/posts/proving-one-greater-than-zero/</guid><description>&lt;blockquote>
&lt;p>This post was first published in my old blog, hosted at &lt;code>blog.neerajadhikari.com.np&lt;/code>.
I have since taken down the old blog and copied some of its posts here.&lt;/p>
&lt;/blockquote>
&lt;p>How do you know that 1 is greater than 0? What a silly question! By intuition,
you might say. Zero means nothing, and one means a unit quantity of something.
And surely something is more than nothing. Something even an infant would know.
But that&amp;rsquo;s intuition, or common sense. Intuition is a powerful thing, but it
won&amp;rsquo;t get us very far in mathematics. That&amp;rsquo;s why we have mathematical rigor -
where we use axiomatic systems which have a set of statements that we consider
true (axioms), and then use rigid, very mechanical symbol-manipulation rules to
generate other statements that are true.&lt;/p>
&lt;p>I am currently studying Michael Spivak&amp;rsquo;s &lt;em>Calculus&lt;/em>, both to brush up my
calculus knowledge and because it is known for taking a very rigorous approach,
meticulously proving theorems that other books often state without proof. The
first chapter is on the properties of numbers. While it doesn&amp;rsquo;t start right
from the &lt;a href="https://en.wikipedia.org/wiki/Peano_axioms">bottom&lt;/a> (it leaves out
properties of equality, for example), it presents of 12 properties from which
we can derive other interesting truths. If we assume just some basic properties
of addition, multiplication and the inequality symbols, and know nothing else
about numbers except what our properties and derived facts tell us, lets see
what we need to conclude that $$ 1 > 0 $$.&lt;/p>
&lt;p>Here are the 12 properties that we will consider true:&lt;/p>
&lt;h3 id="nbspnbspnbspnbspaddition-properties">    Addition Properties&lt;/h3>
&lt;ol>
&lt;li>
&lt;p>If $$a$$, $$b$$ and $$c$$ are any numbers,&lt;/p>
$$$ a + (b + c) = (a + b) + c $$$
&lt;p>This property is called the &lt;em>associativity of addition&lt;/em> and it provides us
a means of adding more than two numbers, by saying that the order in which
you perform the individual additions does not matter.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>If $$a$$ is any number,&lt;/p>
$$$ a + 0 = 0 + a = a $$$
&lt;p>This property states the existence of the number 0, indicates its defining
behavior. 0 is called the &lt;em>additive identity&lt;/em> because it leaves numbers
unchanged when it is added to them. With this property have our first
actual, concrete number. The previous property talked of &amp;lsquo;any numbers&amp;rsquo; and
used letters to denote them but provided no examples.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>For every number $$a$$, there is a number $$-a$$ such that&lt;/p>
$$$ a + (-a) = (-a) + a = 0 $$$
&lt;p>Here we establish a relationship between any (and every) number, its
&lt;em>additive inverse&lt;/em> that we denote by a minus sign before the number, and 0.
For convenience, we can write $$a+(-b)$$ as $$a-b$$.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>If $$a$$ and $$b$$ are any numbers, then&lt;/p>
$$$ a + b = b + a $$$
&lt;p>Essentially, the result of addition is the same, whatever the order of
numbers around the addition symbol. This property is known as the
&lt;em>commutativity of addition&lt;/em>.&lt;/p>
&lt;h3 id="multiplication-properties">Multiplication Properties&lt;/h3>
&lt;/li>
&lt;li>
&lt;p>If $$a$$, $$b$$ and $$c$$ are any numbers,&lt;/p>
$$$ a \cdot (b \cdot c) = (a \cdot b) \cdot c $$$
&lt;p>This is the same as property 1, but for a new operation we call
multiplication and denote by $$\cdot$$. This is called the &lt;em>associativity
of multiplication&lt;/em>.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>If $$a$$ is any number,&lt;/p>
$$$
\begin{eqnarray}
a \cdot 1 = 1 \cdot a = a\\
Also, 1 \neq 0
\end{eqnarray}
$$$
&lt;p>Like property 2 does for addition, this property defines a &lt;em>multiplicative
identity&lt;/em>. Muliply any number with $$1$$, and you leave the number unchanged.
The property also mentions that $$1 \neq 0$$, to differentiate the new
concrete number $$1$$ that we have introduced here from the $$0$$ that we
introduced earlier. Without this disclaimer, $$1$$ could have been just
another symbol for $$0$$. There is nothing in the previous properties to
prohibit that, because this is the property that defines $$1$$ for the
first time.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>For every number $$a \neq 0$$, there exists a number $$a^{-1}$$ such that&lt;/p>
$$$ a \cdot a^{-1} = a^{-1} \cdot a = 1 $$$
&lt;p>Similar to property 3, but this one defines a &lt;em>multiplicative inverse&lt;/em>. And
a very important thing to note, multiplicative inverses are defined for all
numbers except $$0$$.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>If $$a$$ and $$b$$ are any numbers,&lt;/p>
$$$ a \cdot b = b \cdot a $$$
&lt;p>Like for addition, the order of the numbers you are multiplying does not
affect the result of multiplication. This is called the &lt;em>commutativity of
multiplication&lt;/em>.&lt;/p>
&lt;p>At the moment we know a lot about addition and multiplication, but there is
not much we can do. For example, we would be helpless if we wanted to prove
that $$ a \cdot 0 = 0 $$ for any number a. That is because in the
properties we have seen, $$0$$ only appears with addition and what we are
trying to prove involves multiplication. So we need something that relates
these two operations.&lt;/p>
&lt;h3 id="a-property-of-both">A Property of Both&lt;/h3>
&lt;/li>
&lt;li>
&lt;p>If $$a$$, $$b$$ and $$c$$ are any numbers,&lt;/p>
$$$ a \cdot (b+c) = a \cdot b + a \cdot c $$$
&lt;p>This is called the &lt;em>distributive law&lt;/em>, and by tying addition and
multiplication together it enables us to prove what we want:&lt;/p>
$$$
\begin{eqnarray}
a \cdot 0 + a \cdot 0 &amp;=&amp; a \cdot (0 + 0) \nonumber \\
&amp;=&amp; a \cdot 0 \nonumber \\
\end{eqnarray}
$$$
&lt;p>Adding $$-(a\cdot0)$$ to both sides, we get $$ \mathbf{a \cdot 0= 0}$$&lt;/p>
&lt;p>While we are here, lets prove two other facts we will need later. First,
$$ (-a) \cdot b = -(a \cdot b)$$, which is simple:&lt;/p>
$$$
\begin{eqnarray}
(-a) \cdot b + a \cdot b &amp;=&amp; [(-a) + a] \cdot b \nonumber \\
&amp;=&amp; 0 \cdot b \nonumber \\
&amp;=&amp; 0 \nonumber \\
\end{eqnarray}
$$$
&lt;p>Adding $$-(a \cdot b)$$ to both sides, we get
$$\mathbf{(-a) \cdot b = -(a\cdot b)}$$&lt;/p>
&lt;p>Another fact we can prove is $$(-a)\cdot(-b) = a\cdot b$$&lt;/p>
$$$
\begin{eqnarray}
(-a) \cdot (-b) + [- (a \cdot b)] &amp;=&amp; (-a) \cdot (-b) + (-a) \cdot b \nonumber \\
&amp;=&amp; (-a) \cdot [(-b) + b] \nonumber \\
&amp;=&amp; (-a) \cdot 0 \nonumber \\
&amp;=&amp; 0 \nonumber \\
\end{eqnarray}
$$$
&lt;p>Adding $$a \cdot b$$ to both sides, we get
$$\mathbf{(-a) \cdot (-b) = (a\cdot b)}$$&lt;/p>
&lt;p>A good set of facts we&amp;rsquo;ve got proved at the point, but absolutely no way of
doing anything with inequalities. Essentially, we know there are &lt;em>at least&lt;/em>
two numbers, $$0$$ and $$1$$, but have no notion of &amp;lsquo;greater than&amp;rsquo; or
&amp;lsquo;smaller than&amp;rsquo;. The next three properties will change this situation.&lt;/p>
&lt;p>Instead of defining inequalities right away, it is more convenient to
define $$P$$ as the set of all positve numbers, and state properties 10-12
in terms of $$P$$.&lt;/p>
&lt;h3 id="inequality-properties">Inequality Properties&lt;/h3>
&lt;/li>
&lt;li>
&lt;p>If $$a$$ is any number, then one and only one of the following is true:&lt;/p>
&lt;ul>
&lt;li>$$ a = 0 $$&lt;/li>
&lt;li>$$ a $$ is in $$P$$&lt;/li>
&lt;li>$$ (-a) $$ is in $$P$$&lt;/li>
&lt;/ul>
&lt;p>This is called the &lt;em>Trichotomy Law&lt;/em>. It cleanly separates numbers into
three categories: $$0$$, numbers which are in $$P$$ and numbers whose
additive inverses are in $$P$$.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>If $$a$$ and $$b$$ are in $$P$$, then $$a + b$$ is in $$P$$.&lt;/p>
&lt;p>This is called the &lt;em>closure of positive numbers under addition&lt;/em>.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>If $$a$$ and $$b$$ are in $$P$$, then $$a \cdot b$$ is in $$P$$.&lt;/p>
&lt;p>This is called the &lt;em>closure of positive numbers under
multiplication&lt;/em>.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;p>So now we have our 12 properties. It is time now to define the symbols $$\lt$$,
$$\gt$$, $$\le$$ and $$\ge$$.&lt;/p>
$$$
\begin{eqnarray}
a \gt b &amp; \; \text{if} \; &amp; a - b \; \text{is in} \; P \\
a \lt b &amp; \; \text{if} \; &amp; b \gt a\\
a \ge b &amp; \; \text{if} \; &amp; a \gt b \; \text{or} \; a = b\\
a \le b &amp; \; \text{if} \; &amp; a \lt b \; \text{or} \; a = b\\
\end{eqnarray}
$$$
&lt;p>Hold on, because we are almost there. We need to prove one crucial fact first:
that if $$ a \lt 0 $$ and $$ b \lt 0 $$, then $$ a \cdot b \gt 0 $$. In other
words, the product of two negative numbers is positive.&lt;/p>
$$$
\begin{eqnarray}
&amp; \Rightarrow &amp; a \lt 0 \\
&amp; \Rightarrow &amp; 0 \gt a \\
&amp; \Rightarrow &amp; 0 \gt a \\
&amp; \Rightarrow &amp; 0-a \; \text{is in} \; P\\
&amp; \Rightarrow &amp; -a \; \text{is in} \; P\\
&amp; \text{Similarly,} &amp; -b \; \text{is in} \; P\\
&amp; \Rightarrow &amp; (-a)\cdot(-b) \; \text{is in} \; P\\
&amp; \Rightarrow &amp; a\cdot b \; \text{is in} \; P\\
&amp; \Rightarrow &amp; a\cdot b - 0\; \text{is in} \; P\\
&amp; \Rightarrow &amp; \mathbf{a\cdot b \gt 0}\\
&amp; \end{eqnarray}
$$$
&lt;p>We have proved that if $$ a \lt 0 $$ and $$ b \lt 0 $$, then
$$ a \cdot b \gt 0 $$. But it is also true that $$ a \cdot b \gt 0 $$ when
$$ a \gt 0 $$ and $$ b \gt 0 $$, because in that case both $$a$$ and $$b$$ are
in $$P$$ and thus $$a\cdot b$$ is in $$P$$ by Property 12. To say them both in
the same sentence, $$ a \cdot b \gt 0 $$ when $$ a \lt 0 $$ and $$ b \lt 0 $$
or $$ a \gt 0 $$ and $$ b \gt 0 $$. In the special case where $$a=b$$,
$$a^2\gt0$$ when $$a \gt 0$$ or $$a \lt 0$$. By the trichotomy law, that is the
same as $$a \neq 0$$. And because we have defined $$1$$ as being not equal to
$$0$$, and because $$ 1^2 = 1\cdot1 = 1$$, we can finally conclude what we
needed to:&lt;/p>
$$$ \mathbf{1 \gt 0} $$$
&lt;h3 id="ps">P.S.&lt;/h3>
&lt;p>It took a lot of properties to prove that $$1 \gt 0$$, but after proving just
two more facts, we can proceed to prove inequality relations for all integers.&lt;/p>
&lt;p>If $$a\lt b$$, so $$b-a$$ is in $$P$$, then
$$(b-a)+(c-c) = (b+c) - (a+c)$$ is in $$P$$. Thus, $$a+c \lt b+c$$.&lt;/p>
&lt;p>If $$a\lt b$$ and $$b \lt c$$, then $$b-a$$ is in $$P$$ and $$c-b$$ is in
$$P$$. By Property 11, $$(c-b)+(b-a) = c-a$$ is in $$P$$. Thus, $$ a \lt c$$.&lt;/p>
&lt;p>Because we have $$ 0 \lt 1$$, by the former of these two facts,
$$ 0 + 1 \lt 1 + 1 $$, or $$1 \lt 1 + 1$$. Instead of leaving $$ 1 + 1$$ as it
is, we can use the well-known symbol for it, $$2$$, so $$\mathbf{ 1 \lt 2}$$.
Similarly, $$1 + 1 \lt 2 + 1$$, aka $$\mathbf{2 \lt 3}$$ and so on. And we can
also compare non-consecutive numbers: becuase $$ 0 \lt 1 $$ and
$$ 1 \lt 2 $$, $$\mathbf{0 \lt 2}$$. Similarly, we can derive inequalities for
the negative numbers, and &lt;em>viola!&lt;/em>, an order is enforced on all integers.&lt;/p></description></item></channel></rss>