A THEORETICAL MODEL FOR THE STRESS DISTRIBUTION IN GRANULAR MATTER. I. BASIC EQUATIONS